TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #425 · 20 апр.

Недавно делал быстрый прототип асинхронного приложения в котором требовалось вызывать много синхронного кода. Да, я знаю, что это не лучший дизайн, но нужно было быстрое решение на один процесс и без очередей. Поэтому я выполнял код в потоках. Выглядело это примерно так: from fastapi.concurrency import run_in_threadpool async def execute(data: DataRequest) -> DataResponse: try: result = await run_in_threadpool(sync_function, data) return DataResponse(data=result) except Exception as e: return DataResponse( error=str(e), success=False, ) В общем работает нормально. Для всех вызовов под капотом используется общий тредпул, всё работает предсказуемо. Но потребовалось изменить количество запускаемых в пуле потоков (по умолчанию создается 40 воркеров). Так как дело происходит с FastAPI, делается это через lifespan используя настройки anyio: import anyio @asynccontextmanager async def lifespan(app: FastAPI): limiter = anyio.to_thread.current_default_thread_limiter() limiter.total_tokens = 100 yield # если вдруг нужно вернуть обратно limiter.total_tokens = 40 Зачем менять количество воркеров? - уменьшить, если оперативки мало (один тред занимает ~8мб) - увеличить чтобы выдержать нагрузку Если есть предложения получше при тех же вводных - предлагайте😉 #async

Hashtags

Резултати

Пронајдени 7 слични објави

Пребарај: #cefi

当前筛选 #cefi清除筛选
Сигналы РЦБ Крипто

@usa100cks · Post #24887 · 11.02.2026 г., 17:19

#CeFi BlockFills приостановил ввод и вывод средств на фоне турбулентности рынка Криптокредитор BlockFills временно остановил клиентские депозиты и выводы, сославшись на высокую волатильность. Компания из Чикаго обслуживает около 2 000 институциональных клиентов и в 2025 году провела операций на $60 млрд. Торговля для части клиентов продолжается, но ликвидность ограничена.

Hashtags

HEXN.IO Channel

@hexnio · Post #706 · 25.01.2024 г., 13:01

🚀 New Listing: $CREDI Is Now Listed on the HEXN.IO Smart Exchange! 🚀 Another one has landed in our Smart Exchange! Explore Credefi (CREDI) with HEXN.IO, an all-in-one crypto platform that unites habitual and advanced approaches to money management. What is Credefi? Credefi Finance is a hybrid fin-tech solution that provides a state-of-the-art platform offering crypto lending and fiat borrowing collateralized with real-world assets. #RWA 💰 Credefi's mission is to bridge the gap in debt financing in the European Union and facilitate real-world impact by providing fair and accessible lending solutions to small and medium-sized enterprises (SMEs) in the region. 🏦 With Credefi, users can access reliable loans backed by a range of real-world assets, including real estate, future receivables, and more. The lending platform offers lenders stable and predictable returns generated from the real economy. 📈 Credefi works towards revolutionizing the alternative lending industry and making a positive difference in the world of #DeFi and #CeFi. Ready to explore CREDI? 👉 Start trading Credefi ($CREDI) on HEXN.IO now!

🗺 Travel the World | Private Expeditions

@expeditionsworldwide · Post #238 · 12.12.2020 г., 04:21

From #CeFi to #DeFi in one picture. The amount of fees on #Ethereum spent on $ETH deposits to centralized exchanges has fallen from ~25% in 2017 to less than 1% today. Almost all fees spent on txs involving centralized exchanges in the past months were used for ETH withdrawals.

Scary bonuses from Electra!❤️ 🚀Electra , the newest multi-chain DEX that combines the best features of #CeFi and #DeFi, one of the best startups at the Blockchain Life 2024 conference, has transformed its mini-app in honor of the main holiday of UPtober — Halloween!👁 Electra Spooky SeasonEvent😏started! Take advantage of holiday special: 🔼 Catch special Halloween boosters 🌈 Farm x2 points in Bulls'n'Bears! 🔮 Farm x2 points for BTC predictions. Hurry! Special game bonuses are available for a week only!🧪 🍲Farm Halloween points with Electra #electra#TON#DEX#DeFi#Web3

​​🎙CHOis one of few altcoins growing amidst this crypto winter. Over the summer, the Choise.com project, recently known as Crypterium, released the DeFi platform Charism, launched web3.0 interest accounts with notable 15% APY for USDT and USDC, announced the release of Web3.0 NFT Interest accounts and an extremely relevant product for the current market - crypto price insurance. CHO is planed to list in next CEX exchange Gate.io at 31 August. Token’s trading volume on CMC has shown Х3 after the event and amounted over $10K. 📌 ultra successful trading false start on gate.io 📌 Altcoin traded for $3M 📌 $3M price for $CHO token – trial listing on #Gate_io ⏰ Date of trading at gate.io: 31 August 💻 Website: https://choise.com/ ⚙️ Twitter: https://twitter.com/ChoiseCom #web3#listing#gate.io #Defi#CeFi

🤩Fintopio is a new non-custodial wallet in the TON ecosystem #Fintopio is a cryptocurrency wallet in🪙 Telegram, which can be used via mini app and website. With its help, you can conveniently use #DeFi and #CeFi functions, pay bills, divide expenses, buy goods and transfer money without leaving the application. To get started quickly, you can import an existing wallet: 🟡Open "DeFi" tab in the Fintopio app 🟡 Click "View all" 🟡 Next – “Import wallet” 🟡 Enter your 12-word secret phrase to import your wallet 👛Currently the wallet supports: #BTC, #USDT [#ERC20/#TRC20], #ETH, #TRX and #TON. 📲 The project has a game to attract an audience where $HP (Hold Points) are farmed. You need to collect coins every 8 hours and in the future you can exchange them for the main utility token of Fintopio named $HOLD. The token is only available to early participants of the project, the more you #HOLD, the more rewards you will receive from Fintopio. So it's better to start right now!🚀 Game | Channel | Website