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

Резултати

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

Пребарај: #mina

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

@CoinSonar · Post #243985 · 18.04.2026 г., 05:37

#MINA | Volume spike (USDT PAIR) 179 times the average volume 95.80K USDT traded in 1 min └Selling vol: 74.32K USDT 🔴 Boost score: 1/10 24h Vol: 768.66K USDT (Binance) Price: 0.0608 (-1.4% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28567 · 21.03.2025 г., 15:57

#MINA/USDT analysis : #MINA is currently in a downtrend, trading below the 200 EMA. The price is currently testing the resistance zone and showing bearish sentiments. It is anticipated to decline from there and test the swing low levels. TF : 2h Entry : $0.2585 Target : $0.2425 / $0.2253 SL : $0.2782

Hashtags

Pro Analysis

@proanalysistrader · Post #27983 · 04.10.2024 г., 11:39

#MINA/USDT analysis : #MINA has recently broken support levels. The price is likely to retest the zone and continue its bearish momentum. Previous lows will be tested. TF : 4H Entry : $0.5301 Target : $0.4415 SL : $0.5905

Hashtags

American Crypto©

@americancryptotrading · Post #27622 · 16.05.2026 г., 09:30

🇺🇸#MINA/USDT is rebounding from the lowerboundary of the descendingchannel on the weekly timeframe👨‍💻 Looking for a bounce📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27558 · 15.03.2026 г., 10:18

🇺🇸#MINA/USDT is attempting to bounce from the lowerborder of the descendingchannel pattern on the weekly timeframe💁‍♂️ Pressure is building🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27502 · 14.01.2026 г., 11:05

🇺🇸#MINA/USDT is bouncing from the lowerborder of the descendingchannel formation on the weekly timeframe🔍 Full send🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27428 · 04.11.2025 г., 09:58

🇺🇸#MINA/USDT is currently shaping the descending channel on the weekly chart💁‍♂️ Looks bullish📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27241 · 07.05.2025 г., 10:31

🇺🇸#MINA/USDT is facing the lowerboundary of the fallingwedge on the weekly timeframe💁‍♂️ Looks good for the mid-term🐃 American Crypto©

Hashtags

Free Crypto Signals (Profitable Zone)

@btctradingclub · Post #26274 · 06.11.2025 г., 18:40

✅✅ 61% Profit on #MINA/USDT for our Premium Members on Binance Futures/Bybit/OKX & KuCoin 🔥🔥 All target completed 👁‍🗨Contact @primemod to enter the Premium Binance Futures/Bybit/Kucoin/OKX & SPOT Group for daily gains

Hashtags

ПретходнаСтраница 1 од 4Следна