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

Резултати

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

Пребарај: #mbox

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

@CoinSonar · Post #244164 · 18.04.2026 г., 12:08

#MBOX | Volume spike (USDT PAIR) 13 times the average volume 173.59K USDT traded in 15 min └Selling vol: 122.60K USDT 🔴 Boost score: 1/10 24h Vol: 1.22M USDT (Binance) Price: 0.0152 (-2.5% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #244112 · 18.04.2026 г., 10:08

#MBOX | Volume spike (USDT PAIR) 10 times the average volume 128.49K USDT traded in 15 min └Buying vol: 74.31K USDT 🟢 Boost score: 5/10 24h Vol: 1.22M USDT (Binance) Price: 0.0157 (-2.5% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #244047 · 18.04.2026 г., 07:48

#MBOX | Volume spike (USDT PAIR) 29 times the average volume 125.59K USDT traded in 5 min └Selling vol: 69.68K USDT 🔴 Boost score: 1/10 24h Vol: 1.22M USDT (Binance) Price: 0.0154 (-2.5% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243990 · 18.04.2026 г., 05:48

#MBOX | Volume spike (USDT PAIR) 10 times the average volume 131.44K USDT traded in 15 min └Selling vol: 66.19K USDT 🔴 Boost score: 1/10 24h Vol: 1.22M USDT (Binance) Price: 0.0142 (-2.5% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243446 · 17.04.2026 г., 04:47

#MBOX | Volume spike (USDT PAIR) 10 times the average volume 129.11K USDT traded in 15 min └Buying vol: 88.30K USDT 🟢 Boost score: 6/10 24h Vol: 1.22M USDT (Binance) Price: 0.0153 (-2.5% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28566 · 21.03.2025 г., 08:47

#MBOX/USDT analysis : #MBOX is currently in a downtrend, trading below the 200 EMA. The price has been rejected from the resistance zone and broken below the trendline. It is expected to decline further and test the swing low. TF : 2h Entry : $0.0845 Target : $0.0756 SL : $0.0900

Hashtags

Pro Analysis

@proanalysistrader · Post #28391 · 16.01.2025 г., 08:05

#MBOX/USDT analysis : #MBOX is in a downtrend, consistently making lower lows (LLs) and lower highs (LHs) below the 200 EMA. Currently, the price is retracing towards the 200 EMA and a resistance zone. It is anticipated that the price will test this zone before reverting back to continue its bearish momentum, potentially reaching lower levels. TF : 4h Entry : $0.1865 Target : $0.1566 SL : $0.2037

Hashtags

Pro Analysis

@proanalysistrader · Post #27984 · 04.10.2024 г., 13:28

#MBOX/USDT analysis : #Mbox is currently in a downtrend, trading below the 200 EMA. The price is forming a structure of lower lows and lower highs. It is facing rejection from the resistance zone, which suggests a potential reversal that could reinforce its bearish trend and test previous lows. TF : 15min Entry : $0.1332 Target : $0.1269 SL : $0.1366

Hashtags

American Crypto©

@americancryptotrading · Post #27460 · 05.12.2025 г., 10:37

🇺🇸#MBOX/USDT is bouncing from the support zone inside the descendingchannel pattern on the weekly chart🔍 Looks bullish✈️ American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27179 · 09.03.2025 г., 15:28

🇺🇸#MBOX/USDT has found support at the lowerborder of the descendingchannel pattern on the weekly timeframe👀 Looking for a rise🐃 American Crypto©

Hashtags

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