@digitalgentop · Post #69 · 22.05.2024 г., 05:45
⚡️🇺🇸🇨🇳⚡️President Joe Biden blocks Chinese-backed cryptocurrency mining firm from owning land near a Wyoming nuclear missile base. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
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
Пребарај: #bitcoincommunity
@digitalgentop · Post #69 · 22.05.2024 г., 05:45
⚡️🇺🇸🇨🇳⚡️President Joe Biden blocks Chinese-backed cryptocurrency mining firm from owning land near a Wyoming nuclear missile base. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #68 · 22.05.2024 г., 05:32
⚡️💥CFTC issues order against crypto prime brokerage firm "Falcon Labs" for illegally providing 🇺🇸 U.S. customers access to digital asset derivatives trading platforms #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #67 · 22.05.2024 г., 05:16
☄️🥇🕯Some MtGox lenders stated that the official website form has recently been updated, including the expected number of tokens to be withdrawn (BTC BCH Yen) and payment status. Mt Gox is expected to distribute its assets of 142,000 BTC, 143,000 BCH and 69 billion yen to creditors by October 31, 2024. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #66 · 22.05.2024 г., 04:44
⚡️👀💵A Dutch court found Tornado Cash developer Alexey Pertsev guilty of laundering $1.2 billion - he was involved in 36 illegal transactions, one of which was related to the hacking of the Ronin blockchain bridge of the Axie Infinity game in 2022. Lawyers have two weeks to file an appeal. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #65 · 22.05.2024 г., 04:31
☄️🇦🇪 Tether is expanding in the UAE — a partnership agreement has been signed with RAK DAO. The cooperation is aimed at introducing blockchain technologies, crypto-payments and developing educational initiatives in Ras al-Khaimah (UAE). RAK DAO is the first free economic zone focused on crypto companies. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #64 · 22.05.2024 г., 04:01
⚡️✨GameStop $GME and AMC Entertainment $AMC short sellers have lost over 💵5 billion in the last 2 days. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #63 · 22.05.2024 г., 03:44
⚡️“The growing national debt and excessive spending by the US government could lead to financial disaster as early as 2025,” - the former head of the World Bank.🌐🕯 #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #62 · 22.05.2024 г., 03:41
👀⚡️Arkham analysts have identified the wallets of celebrities with more than 1 million Twitter followers who have invested in cryptocurrency : 1️⃣ Donald Trump owns the largest crypto portfolio, estimated at approximately 💵7 million . 2️⃣ Justin Bieber holds 💵450,000 worth of digital assets - 146 ETH and 12,136 APE, as well as several NFTs 🔵 3️⃣ Brazilian football player Neymar keeps about 💵55,000 in crypto . 4️⃣ Actors Jimmy Fallon and Kevin Hart hold $112,000 and 💵39,800 in crypto, respectively. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #61 · 22.05.2024 г., 03:30
☄️🇩🇪 Question for 💸75,000 in the German version “Who wants to become a millionaire?” 💰The first country in the world to accept Bitcoin as legal tender? #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #60 · 22.05.2024 г., 03:15
⚡️🇸🇻 El Salvador mines 474 Bitcoin worth 💵29 million using its volcano-fueled geothermal power plant. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #59 · 22.05.2024 г., 03:02
⚡️🔖Consensys introduced Smart Transactions - a feature for Metamask users. Transactions will be confidential until confirmed online, and bots will not be able to read them or send their own with advantage. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity
@digitalgentop · Post #58 · 22.05.2024 г., 02:46
☄️🔵Bloomberg's chief ETF analyst Eric Balchunas believes that based on the behavior, the SEC considers ETH a security, and that the likelihood of approval of a spot ETH-ETF is now almost zero. #Cryptocurrencynews #Cryptoinvesting #Bitcoincommunity