@Dogdata · Post #2235 · 20.07.2020 г., 21:05
#Bone live on Coingecko🚀🧨 👉https://www.coingecko.com/en/coins/bone #DogData🐾
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
Пребарај: #dogdata
@Dogdata · Post #2235 · 20.07.2020 г., 21:05
#Bone live on Coingecko🚀🧨 👉https://www.coingecko.com/en/coins/bone #DogData🐾
@Dogdata · Post #2316 · 31.07.2020 г., 17:09
Happy #EidMubarak Best wishes for all DogData Muslim Community Thank you for your kind support 🙏 #DogData#Dogs#EidMubarak 🤩🚀📈😍🤩🚀📈😍🤩🚀📈
Hashtags
@Dogdata · Post #2394 · 14.08.2020 г., 11:08
DogData community🐾 Support us and vote for DogData🙏🐾 Please tag 👇 @FaceBook4Dog#ethbn#bone#dogdata https://twitter.com/gate_io/status/1293863802019119105?s=09 👆👆👆
@Dogdata · Post #2392 · 13.08.2020 г., 19:17
DogData community🐾 Everyone should be interested in getting this. Let's show that we are big, let's show that our community is huge ❗️❗️ Support us and vote for DogData🙏🐾 Please tag 👇 @FaceBook4Dog#ethbn#bone#dogdata https://twitter.com/gate_io/status/1293863802019119105?s=09 👆👆👆
@dogdata · Post #4351 · 08.11.2023 г., 07:01
Let’s bring the Dogs Data to TikTok Join the 🐾 TikTok community Like and share our videos their whenever you can https://www.tiktok.com/@kennel.ai?_t=8h0SUOsjUHI #DogData #$DOGS #Web3#DogBreeder#DogNFT
Hashtags
@dogdata · Post #4338 · 02.11.2023 г., 07:01
Let’s bring the Dogs Data to TikTok Join the 🐾 TikTok community Like and share our videos their whenever you can https://www.tiktok.com/@kennel.ai?_t=8h0SUOsjUHI #DogData #$DOGS #Web3#DogBreeder#DogNFT
Hashtags
@Dogdata · Post #2434 · 19.08.2020 г., 05:32
This is the first of the articles on DogData👏👏 #ETHBN#dogdata#publish0x 👉https://www.publish0x.com/dogdata/mydogdata-xnlwvqz Please rate this article👍🐾
Hashtags
@Dogdata · Post #2497 · 09.09.2020 г., 13:47
💸DogData Wallet 💸 🗓Launched This Week All who registered on the DogData web page should feel free to check up their DogData wallet 🚀 👉https://t.co/JNmxHEyQWw #DogData#Dogs#wallet#cryptocurrencyhttps://t.co/In7tQYMYio
@Dogdata · Post #2453 · 25.08.2020 г., 08:50
🚨Amazing news!📢 We were chosen to be listed on Bitforex CApp!😱🚀 #DogData#Bitforex#Capp
@Dogdata · Post #2271 · 26.07.2020 г., 09:28
🚨🚨TODAY 🚨🚨 #26 July 2020 LIVE AMA🤩📣 #DogData CFO Thomas Melchior With the support #EXCOINCIAL Team 🔴Get your questions prepared. 🔴 Maximum 2 questions per person. THE EVENT HOSTED ON #AFRICUNIA TV Facebook: https://www.facebook.com/africuniatv Instagram: https://www.instagram.com/africuniatv Zoom: https://zoom.us/j/6331039454
Hashtags
@dogdata · Post #4371 · 12.12.2023 г., 07:31
$Dogs token is the governance token for Kennel.Ai platform Web3 on chain platform Where pet dog breeders can tokenise pet dogs using NFT Blockchain is the best way to decentralise dog data Blockchain has created for pet dog breeders the opportunity to manage the industry themselves instead of having to pay and being governed by a centralised organisation #DogData#FCI#DogBreeder#blockchain#Decentralised
@dogdata · Post #4360 · 23.11.2023 г., 07:01
$Dogs token is the governance token for Kennel.Ai platform Web3 on chain platform Where pet dog breeders can tokenise pet dogs using NFT Blockchain is the best way to decentralise dog data Blockchain has created for pet dog breeders the opportunity to manage the industry themselves instead of having to pay and being governed by a centralised organisation #DogData#FCI#DogBreeder#blockchain#Decentralised