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

Резултати

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

Пребарај: #xvs

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

@CoinSonar · Post #243713 · 17.04.2026 г., 14:33

#XVS | Volume spike (USDT PAIR) 83 times the average volume 134.86K USDT traded in 15 min └Buying vol: 79.34K USDT 🟢 Boost score: 5/10 24h Vol: 154.69K USDT (Binance) Price: 3.30 (-2.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243630 · 17.04.2026 г., 12:15

#XVS | Volume spike (USDT PAIR) 79 times the average volume 128.29K USDT traded in 15 min └Selling vol: 64.97K USDT 🔴 Boost score: 1/10 24h Vol: 154.69K USDT (Binance) Price: 3.11 (-2.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243586 · 17.04.2026 г., 10:14

#XVS | Volume spike (USDT PAIR) 80 times the average volume 129.02K USDT traded in 15 min └Buying vol: 69.97K USDT 🟢 Boost score: 4/10 24h Vol: 154.69K USDT (Binance) Price: 2.96 (-2.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243522 · 17.04.2026 г., 08:00

#XVS | Volume spike (USDT PAIR) 1097 times the average volume 117.85K USDT traded in 1 min └Buying vol: 74.44K USDT 🟢 Boost score: 8/10 24h Vol: 154.69K USDT (Binance) Price: 2.76 (-2.2% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28469 · 13.02.2025 г., 16:42

#XVS/USDT analysis : #XVS has broken out above the 200 EMA and the previous swing high, exhibiting strong bullish momentum. The price is currently retracing and testing the support zone along with the 200 EMA. It is expected to retest this area and rebound, continuing its bullish momentum towards testing the swing high level. TF : 4H Entry : $7.60 Target : $9.33 SL : $6.84

Hashtags

Pro Analysis

@proanalysistrader · Post #28044 · 20.10.2024 г., 17:13

#XVS/USDT analysis : #XVS is in an uptrend, trading above the 200 EMA and consolidating over the support zone. The price is expected to bounce back from the support zone and test the previous highs. TF : 4H Entry : $7.42 Target : $8.05 SL : $7.00

Hashtags

Pro Analysis

@proanalysistrader · Post #27857 · 20.08.2024 г., 01:00

#XVS/USDT analysis : #XVS has recently broken out of the ascending triangle pattern on the LTF. Price is trading above the 200 EMA. It is expected to continue its bullish momentum and test previous swing highs. TF : 2H Entry : $6.98 Target : $7.59 SL : $6.64

Hashtags

Crypto Headlines

@market_headlines · Post #27722 · 16.03.2026 г., 06:49

#xvs 😭 Джастин Сан продал 621k XVS (Venus) за $1,95m с убытком ~$5,63m (-74%). В январе 2024 года основатель Tron купил эти токены за $7,58m. Ранее: атака на Venus Crypto Headlines

Hashtags

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