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

Резултати

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

Пребарај: #onboarding

当前筛选 #onboarding清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #3542 · 20.12.2024 г., 09:31

Motion.io Secures $3.17M Funding Motion.io raises $3.17M on December 18, 2024, to enhance their white-label client portals. The funding will support automating client onboarding and improving file, signature, and feedback collection processes. #MotionIo#Funding#ClientPortals#Automation#Onboarding#TechFunding#Feedback#Signatures#WhiteLabel#Startup#Investment

GitHub Trends

@githubtrending · Post #15504 · 19.02.2026 г., 12:00

#other#awesome_list#awesone#distrubuted#global#infra#onboarding#paas#saas#toolbox Free SaaS tools span multiple business functions—from project management (Asana, Trello) and CRM (HubSpot, Zoho) to design (Figma), video conferencing (Zoom), and data analysis—enabling startups and small teams to operate efficiently without upfront costs. Many platforms offer free tiers with essential features, allowing you to test tools before upgrading. This approach lets you build a complete tech stack affordably, scale gradually as your business grows, and allocate budget toward features that directly drive revenue rather than basic software licenses. https://github.com/LlamaGenAI/awesome-free-saas

Venture Village Wall 🦄

@venturevillagewall · Post #3402 · 18.12.2024 г., 12:10

Dfns Secures $16M Funding Dfns, the wallet-as-a-service (WaaS) platform, has raised $16 million in funding as of December 18, 2024. The platform is designed to simplify digital asset operations and facilitate safe crypto onboarding for leading organizations. #Dfns#Funding#WaaS#DigitalAssets#Crypto#Operations#Onboarding#Investment#Security#Technology#Finance#Blockchain#Startups#Innovation#Market#Users#Ecosystem#Wallet#Services#Platform#Growth

Venture Village Wall 🦄

@venturevillagewall · Post #4267 · 28.02.2025 г., 10:00

Uniswap Expands Crypto-to-Fiat Options Uniswap collaborates with Robinhood, MoonPay, and Transak to enable seamless crypto-to-fiat transactions. Users across 180+ countries can convert crypto and deposit funds directly into bank accounts via the mobile wallet. This feature will soon be available on the browser extension and web version. For more details, visit Leviathan News. #Uniswap#Crypto#Robinhood#MoonPay#Transak#Banking#Fiat#DEX#Blockchain#Finance#Tech#Global#Innovation#Payments#Wallet#Transactions#Defi#Onboarding#CryptoAdoption#VC