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

Резултати

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

Пребарај: #band

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

@CoinSonar · Post #243780 · 17.04.2026 г., 17:07

#BAND | Volume spike (USDT PAIR) 318 times the average volume 110.09K USDT traded in 5 min └Selling vol: 72.65K USDT 🔴 Boost score: 1/10 24h Vol: 99.59K USDT (Binance) Price: 0.238 (-2.3% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243715 · 17.04.2026 г., 14:41

#BAND | Volume spike (USDT PAIR) 128 times the average volume 133.15K USDT traded in 15 min └Selling vol: 67.98K USDT 🔴 Boost score: 1/10 24h Vol: 99.59K USDT (Binance) Price: 0.245 (-2.3% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243615 · 17.04.2026 г., 11:26

#BAND | Volume spike (USDT PAIR) 128 times the average volume 132.92K USDT traded in 15 min └Buying vol: 80.65K USDT 🟢 Boost score: 3/10 24h Vol: 99.59K USDT (Binance) Price: 0.257 (-2.3% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243515 · 17.04.2026 г., 07:47

#BAND | Volume spike (USDT PAIR) 124 times the average volume 129.15K USDT traded in 15 min └Buying vol: 109.53K USDT 🟢 Boost score: 6/10 24h Vol: 99.59K USDT (Binance) Price: 0.246 (-2.3% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28431 · 28.01.2025 г., 14:17

#BAND/USDT analysis : #BAND is in a downtrend. The price has broken down and retested the previous support levels. It is expected to resume its bearish direction from the current level and test lower levels. TF : 2H Entry : $1.168 Target : $1.068 SL : $1.238

Hashtags

Pro Analysis

@proanalysistrader · Post #28341 · 15.12.2024 г., 03:45

#BAND/USDT analysis : #BAND has successfully tested the 200 EMA and has bounced back. Currently, the price is retracing toward a key support zone. It is recommended to wait for the price to retest this support zone before considering a long entry. There is a strong expectation that the price will rally and aim to test previous highs. TF : 4H Entry : $1.756 Target : $2.326 SL : $1.470

Hashtags

Pro Analysis

@proanalysistrader · Post #28293 · 01.12.2024 г., 09:17

#BAND/USDT analysis : #BAND is in an uptrend, trading above the 200 EMA. The price has recently bounced back from the 200 EMA and a support zone, indicating a continuation of bullish momentum. It is expected that the price will test the previous swing high. TF : 15min Entry : $1.833 Target : $1.990 SL : $1.786

Hashtags

Pro Analysis

@proanalysistrader · Post #27782 · 02.08.2024 г., 05:32

#BAND/USDT analysis - #BAND is in a downtrend, trading below the 200 EMA. The price has retraced to the previous support, which is now acting as resistance, and is being rejected from there to continue its downward momentum. TF : 15min Entry : $1.332 Target : $1.252 SL : $1.380

Hashtags

BULLSTAR - SIGNALS

@bullstar1 · Post #4445 · 22.08.2025 г., 14:55

COIN: $BAND/USDT (5-10x) Direction: LONG 📈 #BAND/USDT Take-Profit Target 5🎯 Profit : 44.12% with 10x Leverage (PREMIUM SIGNAL) Everyone else is just trying to survive… while our VIPs keep hitting big wins! 🔥👇 t.me/BULLSTAR_ADMIN

Hashtags

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