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

Резултати

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

Пребарај: #agenticsolutions

当前筛选 #agenticsolutions清除筛选
Crypto M - Crypto News

@CryptoM · Post #64989 · 10.04.2026 г., 13:04

🚀 AI TRENDS | Secure Blockchain Acquires Agentic Solutions in Stock Deal Secure Blockchain, a publicly traded Canadian company, has announced the acquisition of Agentic Solutions Limited, an AI Agent company based on ElizaOS, in an all-stock transaction valued at approximately $450,000, equivalent to 5 million common shares. According to Foresight News, the company also completed a private placement financing of $1.5 million, with the Eliza Foundation subscribing to about 50% of the shares, amounting to roughly $750,000. The funds raised will be allocated to AI Agent development, platform construction, and operational expenses. Additionally, Secure Blockchain settled $500,000 of debt through the issuance of approximately 4.44 million shares. Following the transaction, the total share capital stands at about 32.59 million shares, with a market value estimated at $3.67 million based on the financing price. The related shares are locked until August 11, 2026. Agentic Solutions is a commercial partner of ElizaOS, focusing on developing enterprise-level AI Agent products within this framework. ElizaOS, created by Eliza Labs, is one of the most active open-source AI Agent frameworks currently available. Secure Blockchain, previously specializing in blockchain embedded email encryption services, is transitioning into the Agentic AI sector following this acquisition. #AI#Blockchain#Acquisition#Financing#ElizaOS#AgenticSolutions#StockDeal#EnterpriseAI#OpenSourceAI#TechInvestment