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

Резултати

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

Пребарај: #pepe

当前筛选 #pepe清除筛选
Coin Sonar

@CoinSonar · Post #243657 · 17.04.2026 г., 13:12

#PEPE | Volume spike (USDT PAIR) 9 times the average volume 2.85M USDT traded in 15 min └Buying vol: 1.79M USDT 🟢 Boost score: 3/10 24h Vol: 28.14M USDT (Binance) Price: 0.00000401 (-4.4% in 24h)

Hashtags

CryptoBull_360™

@cryptobull_360 · Post #49673 · 05.05.2026 г., 14:02

#PEPE is getting ready for massive rally from the breakout zone, Volume rising as good momentum, keep an eye on!! Join Toobit: Get a 30,000 USDT in bonuses using this link https://toobit.pro/t/Cryptobull360 https://x.com/CryptoBull_360/status/2051663832175792393?s=20

Hashtags

CryptoBull_360™

@cryptobull_360 · Post #49556 · 29.04.2026 г., 10:19

🐳#PEPE OG whale Deltacorpse.eth spent $100.2K to buy 21.2M $BULL and locked it. This purchase follows their earlier investment in $PEPE at a $2M market cap.

Hashtags

Crypto Headlines

@market_headlines · Post #28293 · 08.04.2026 г., 21:35

🔥#PEPE Компания Canary Capital подала заявку в SEC на запуск PEPE ETF– документ Crypto Headlines

Hashtags

American Crypto©

@americancryptotrading · Post #27562 · 19.03.2026 г., 09:33

🇺🇸#PEPE/USDT is attempting to rebound from the lowerborder of the fallingwedge pattern on the 3D chart👨‍💻 Bullish case🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27420 · 27.10.2025 г., 08:48

🇺🇸#PEPE/USDT is testing the supportzone on the 2D timeframe👀 Strong upside potential on a bounce📈 American Crypto©

Hashtags

Coin Signals

@coin_signals · Post #16524 · 15.04.2025 г., 09:23

#PEPE/USDT has printed a double bottom and is trying to flip the 50 EMA Target: 200 EMA. 0.00750 -> 0.001100

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #9196 · 11.04.2026 г., 18:56

#PEPE https://www.binance.com/en/trade/PEPE_USDT Buying Zone 350-370 Sell 🤑 400-420 🤑 420-460 🤑 460-500 🤑 500-550 🚀 550 -600 & above Currently facing R if broken x2 we can expect Bullish above 330🔼 Death zone below 330🔽

Hashtags

123•••89
ПретходнаСтраница 1 од 9Следна