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

Резултати

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

Пребарај: #wealthmanagement

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

@CryptoM · Post #65430 · 13.04.2026 г., 07:25

🚀 South Korea Considers Including Digital Assets in Pension Calculations South Korea's Audit and Inspection Board has recommended changes to the country's pension system to include digital assets in the calculation of basic pension eligibility. According to ChainCatcher, the board's report highlights the economic value of digital assets, which are currently excluded from the property scope defined by the basic pension law. This exclusion allows individuals with substantial digital assets to qualify for pension benefits. The board argues that digital assets should be recognized as property with clear economic value, despite their differing form from traditional financial assets. The Ministry of Health and Welfare agrees with this assessment, acknowledging the need to prevent relatively high-income individuals from the lower 70% income bracket from receiving basic pension benefits. The ministry supports the inclusion of digital assets in the property calculation for pension eligibility. #SouthKorea#DigitalAssets#PensionSystem#EconomicValue#FinancialPolicy#BasicPension#MinistryOfHealthAndWelfare#Blockchain#WealthManagement

Venture Village Wall 🦄

@venturevillagewall · Post #4041 · 31.01.2025 г., 19:00

Norway Fund Boosts Bitcoin Holdings Norway's sovereign wealth fund increased Bitcoin exposure by 153%, now holding 3,821 BTC, valued at $350 million. Significant growth from 796 BTC since 2020. Read more: source #Bitcoin#Crypto#VC#Investment #Bitcoin#Crypto#VC#Norway#Investment#SovereignFund#BTC#Finance#WealthManagement#MicroStrategy#DigitalAssets#Growth#MarketTrends#Trends#Assets#Portfolio#Economy#Trading

Venture Village Wall 🦄

@venturevillagewall · Post #4153 · 14.02.2025 г., 19:00

Citi Eyes Crypto Custody Expansion Citi is considering the addition of crypto custody services, indicating a growing interest in the digital asset space. Meanwhile, 60,045,505 #XRP, valued at 163,660,947 USD, was recently transferred between unknown wallets, according to Whale Alert. Read more: BBG #Citi#Crypto#XRP#Custody#WhaleAlert#Finance#DigitalAssets#Banking#Investment#Assets#Blockchain#Wallets#Market#News#Updates#FinanceNews#FinanceTech#WealthManagement#CustodyServices#DigitalCurrency

Venture Village Wall 🦄

@venturevillagewall · Post #3795 · 05.01.2025 г., 10:00

Gold and Bitcoin Gain Structural Significance JPMorgan analysts predict lasting inflation hedging strategies as gold and Bitcoin solidify their roles in investor portfolios. They deem 2024 pivotal for the crypto market with a projected influx of $78 billion. Notably, the share of gold investments among private investors is also on the rise. Read more: ForkLog #JPMorgan#Bitcoin#Gold#Crypto#Investing#Inflation#MarketTrends#Finance#WealthManagement#InvestmentStrategies #2024 #CapitalFlow#DigitalAssets#PortfolioManagement#Cryptocurrency#Hedging#FinancialInsights

Venture Village Wall 🦄

@venturevillagewall · Post #4146 · 14.02.2025 г., 04:00

Bitcoin Investment Bills Could Drive $23B Matthew Sigel from Vaneck highlights that 20 U.S. states are advancing Bitcoin reserve bills, which could inject $23 billion (~247,000 BTC) into the market. Various state funds, including budget surpluses, are proposed for Bitcoin investments. Read more here. #Bitcoin#Investment#Finance#Markets#VC#Crypto#US#Legislation#Blockchain#PensionFunds#Funds#WealthManagement#BudgetSurplus#StateFunds#Reserves#Securities#Trading#Innovation#DigitalAsset#Decentralized#Ecosystem

Venture Village Wall 🦄

@venturevillagewall · Post #4079 · 06.02.2025 г., 01:00

Significant Crypto Transfers Alert 🚨 2,000 #BTC transferred (worth $193M) between unknown wallets. 🚨 50B #HEX transferred to burn address (totaling ~$115M) in multiple transactions. 📰 Tiger 21's high-net-worth investor network holds $6 billion in digital currencies. 📈 MicroStrategy reports Q4 2024 results: BTC Yield at 74.3%, targets 15% for 2025; holds ~447,470 #BTC valued at $23.9B, despite a net loss of $670.8M. For more details on transactions, visit Whale Alert and for MicroStrategy's update check Strategy News. #BTC#HEX#WhaleAlert#Crypto#Finance#MicroStrategy#Investment#Blockchain#Tiger21#Investments#MarketTrends#DigitalAssets#FinancialResults#Earnings#BurnAddress#HighNetWorth#WealthManagement#BTCYield#CryptoHoldings#FinancialMetrics