@coinlegs · Post #9872 · 09.02.2024 г., 11:56
#GNS | Descending Triangle Breakout (1h) The price went above both Weekly Open and Upper Trend Line.
Hashtags
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
Пребарај: #gns
@coinlegs · Post #9872 · 09.02.2024 г., 11:56
#GNS | Descending Triangle Breakout (1h) The price went above both Weekly Open and Upper Trend Line.
Hashtags
@signal_bitcoins · Post #2075 · 28.12.2023 г., 14:31
#GNS finally reached the Daily supply zone,if break up we may see a nice bullish trend, otherwise will reject and we will wait for the reaction price to the first support zone 👀 Supply zone: $5.6 - $5.28✅ Support zone: $3.75 - $3.57✅ ❄️@signals_bitcoin_crypto❄️ ❄️@Shadow_support0o❄️
Hashtags
@sublimetraders · Post #1574 · 02.02.2023 г., 20:46
#ALT market update with some free alpha 🔩 👉JASMY recently added AI to its roadmap, but the move is seen as risky and lacking confidence. AI is expected to be the main trend in 2023, with cryptocurrencies such as #FET, #CTXC, #NMR, #AGIX, and #PHB likely to benefit. 👉ACH has introduced a crypto on-ramp payment solution in Vietnam, where 30-50% of the population is invested in cryptocurrencies. The company also provides incentives for Twitter payments and is obtaining a Hong Kong license, making it a good mid-term investment. 👉CFX's founder has proposed the implementation of a burn mechanism, seeking community approval. If approved, a pump is expected similar to #RENDER. The company is also working with China, making it a good mid-term investment. 👉#RENDER is considered a good long-term investment as it operates in the GPU/VR field and has a burn mechanism in place. Additionally, it has a partnership with Apple and is poised to benefit from the growing trend in AI. 👉Arb cryptocurrencies are good investments during their respective seasons. To invest, buy on dips and hold. Some recommended Zk coins are #SYS, #DUSK, #MINA, #IMX, #CTSI, #MATIC, and #LRC. For arb, consider cryptocurrencies operating in the dex/perp/defi field such as #GMX, #GNS, #BFR, #RPL, and #GMD. 👉The ETH Shanghai update is due in Q1/Q2 with cryptocurrencies such as #FIS, #LDO, #RPL, #FXS, and #ANKR expected to benefit. 👉Finally, we believe that Chinese/Korean/Asian investors are driving the recent market pump. 2023 is the year to invest in China, so take advantage of this opportunity and good luck!