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

Резултати

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

Пребарај: #flux

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

@CoinSonar · Post #244230 · 18.04.2026 г., 15:00

#FLUX | Volume spike (USDT PAIR) 510 times the average volume 98.12K USDT traded in 1 min └Buying vol: 83.86K USDT 🟢 Boost score: 8/10 24h Vol: 276.54K USDT (Binance) Price: 0.0686 (-5.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243608 · 17.04.2026 г., 11:15

#FLUX | Volume spike (USDT PAIR) 111 times the average volume 107.46K USDT traded in 5 min └Buying vol: 63.63K USDT 🟢 Boost score: 6/10 24h Vol: 276.54K USDT (Binance) Price: 0.0721 (-5.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243510 · 17.04.2026 г., 07:43

#FLUX | Volume spike (USDT PAIR) 45 times the average volume 131.75K USDT traded in 15 min └Buying vol: 75.84K USDT 🟢 Boost score: 5/10 24h Vol: 276.54K USDT (Binance) Price: 0.0667 (-5.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243415 · 17.04.2026 г., 02:04

#FLUX | Volume spike (USDT PAIR) 44 times the average volume 129.11K USDT traded in 15 min └Buying vol: 105.98K USDT 🟢 Boost score: 6/10 24h Vol: 276.54K USDT (Binance) Price: 0.0666 (-5.2% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28106 · 02.11.2024 г., 04:52

#FLUX/USDT analysis : #FLUX is currently in a downtrend, forming lower lows (LLs) and lower highs (LHs) below the 200 EMA. The price is rejecting from the resistance zone and is expected to decline further, maintaining its bearish momentum and potentially testing lower levels. Wait for pullback for short entry. TF : 4h Entry : $0.5124 Target : $0.4521 SL : $0.5531

Hashtags

Pro Analysis

@proanalysistrader · Post #27910 · 07.09.2024 г., 15:44

#FLUX/USDT analysis : #FLUX has recently rebounded from the support zone. It is anticipated to keep rising and test the resistance zone on the lower time frame (LTF). TF : 1h Entry : $0.5469 Target : $0.5847 SL : $0.5207

Hashtags

American Crypto©

@americancryptotrading · Post #27569 · 26.03.2026 г., 10:06

🇺🇸#FLUX/USDT is trading near the lowerborder of the descendingchannel on the 3D chart💁‍♂️ Time to load a bag📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27202 · 31.03.2025 г., 18:42

🇺🇸#FLUX/USDT is attempting to bounce off the lower border of the descending channel on the weekly timeframe🔍 Looking for a recovery🚀 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27171 · 01.03.2025 г., 13:21

🇺🇸#FLUX/USDT is attempting to bounce from the supportzone on the weekly timeframe👀 Recovery is on the way🚀 American Crypto©

Hashtags

Crypto Angels

@cryptoangelsusa · Post #21955 · 08.11.2025 г., 06:12

Binance Futures, Bitget Futures, ByBit USDT, KuCoin Futures, OKX Futures #FLUX/USDT All take-profit targets achieved 😎 Profit: 79.8279% 📈 Period: 1 Hours 19 Minutes ⏰

Hashtags

123•••10•••1314
ПретходнаСтраница 1 од 14Следна