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

Резултати

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

Пребарај: #streaming

当前筛选 #streaming清除筛选

🤍💫 | #BTS News 🗞️ — FESTA CUP IS COMING!! 🏆 Let’s work together to support SWIM & ARIRANG’s longevity and increased streaming from May 12th - Jun 13th. Tomorrow begins with the “Please SWIM One More Night” Streaming Battle and Streaming Parties. Check Link for more info👇🏻 🔻 : (https://festa2026.carrd.co/) #streaming @foreverbulletproof7

Direction的碎碎念

@directionchannel · Post #5692 · 11.08.2022 г., 04:54

#News#Streaming 📺迪士尼流媒体总订户数超过Netflix 迪士尼旗下流媒体(Disney+, ESPN+, Hulu)总订户数达到2.21亿,超过Netflix2.207亿,成为全球最大的流媒体公司 其中Disney+ 1.377亿,Hulu 4560万,ESPN+ 2230万 Channel:@Odyssey+

纯情男高

@hanzichen · Post #1453 · 18.12.2025 г., 05:02

PlayTorrio PlayTorrio is an all-in-one media center application that brings together streaming, torrenting, and media management in a beautiful, easy-to-use interface. 🔗 Links: - Download - Screenshots - Features - Website - Source code Developer: ayman707-ux 🫂 Special thanks to: • ᴅᴜxᴛᴀᴍɪ for post • Chopra Ji | [#Inactive] for banner • alex†s | chime/rtwo for screenshots ❤️ Support the Project If this project makes your life easier, here are a few quick ways to show some love: ⭐ Star the repo/app ☕ Buy a coffee for the developer 🛠 Contribute code, issues, or pull-requests 🏷 Tags: #Streaming#Linux#Windows#MacOS

BotsGram®

@botsgram_cu · Post #3652 · 14.03.2021 г., 17:03

¿Que puede hacer este bot? @FileStreamingBot Este bot le brinda un enlace para transmitir cualquier archivo, película o video en Telegram a través de servidores de alta velocidad. También puede descargar el archivo usando un administrador de descargas IDM o ADM. Idioma: inglés (Visto en @botsgram_cu) #enlaces#videos#streaming#descargas

BotsGram®

@botsgram_cu · Post #4022 · 15.06.2021 г., 23:08

¿Que puede hacer este bot? @StreamRadarBot Este bot le muestra en qué plataformas de transmisión están disponibles las películas o series de su elección. Idiomas: español, inglés (Visto en @botsgram_cu) #películas#series#streaming

Libreware

@libreware · Post #1197 · 31.10.2023 г., 13:57

. Louis Rossman and FUTO have released another not -FOSS app of interest. This time they bring us the #video#streaming app #Grayjay, which is designed to let you surf and search all you favorite video streaming services at once. Grayjay does everything the popular NewPipe app does, plus more. Unfortunately NewPipe only worked with YouTube and PeerTube. So far Grayjay works w/these platforms (to a certain extent) - Rumble - Odysee - Youtube - FUTO's PeerTube Instance - Twitch - Patreon - Soundcloud - Kick - Nebula Sorry, no BitChute so far. You can download videos for offline viewing, and then export those to your Movies folder on your phone. You can download the apk install file here: https://grayjay.app/ Their GitLab source code can be found here: https://gitlab.futo.org/videostreaming/grayjay Casting: https://gitlab.futo.org/videostreaming/grayjay/-/blob/master/docs/casting.md ⚠️ License https://gitlab.futo.org/alex/voiceinput/-/blob/master/FTL_LICENSE.md ⚡️@LinuxTechIndex

BotsGram®

@botsgram_cu · Post #3054 · 11.10.2020 г., 04:52

¿Que puede hacer este bot? @anime_streaming_bot ¡Este bot ofrece una enorme biblioteca de anime que puedes ver en streaming sin ningún tipo de publicidad, subtitulados y doblados en ingles, espanol e italiano también es HD! Idiomas: Inglés Italiano Español (Visto en @botsgram_cu) #anime#descarga#streaming#manga

Libreware

@libreware · Post #1198 · 02.11.2023 г., 04:37

BraveNewPipe A libre lightweight streaming front-end for Android Due to restrictive project policy, the #NewPipe team refuses to add platforms that they find offensive. This fork (BraveNewPipe) will not be as restrictive. As long as the platforms work in the spirit of free speech, they could be integrated. Nevertheless, platforms that promote pornography or other degrading things will NOT be included here. Contribute This fork will focus only on integrating other platforms. Unrelated patches will be rejected for now. Feel free to suggest which alternative platforms should be included. Any contribution (development/testing/bug report) is greatly appreciated. Which additional platforms are supported? Bitchute Rumble Other features not found in NewPipe -NewPipe x Sponsorblock into this fork -searchfilters: in the action menu of the search page you can now change the search behavior for the actual search. The supported content/sort filters depend on the service https://github.com/bravenewpipe/NewPipe Download https://github.com/bravenewpipe/NewPipe/releases #yt#video#streaming

Russisches Haus in Berlin

@rushaus · Post #2025 · 01.12.2025 г., 08:05

Manche Geschichten verlieren nie ihre Magie — „Die Schneekönigin“ 1966 gehört genau dazu.❄️👑 📽️ Dieser zauberhafte Märchenfilm basiert auf Hans Christian Andersens klassischer Erzählung und ist perfekt für alle, die magische Geschichten lieben und sich von mutigen Helden inspirieren lassen möchten. 📺 Den Film kann man am Sonntag, dem 7. Dezember, um 13:55 Uhr bei RBB und am Samstag, dem 20. Dezember, um 16:00 bei MDR, oder schon jederzeit in ARD-Mediathek. Ideal für einen gemütlichen nostalgischen Winterabend mit der Familie!🍿🥰 #schneekönigin#filmabend#kino#ardmediathek#rbb#streaming#märchen

12
ПретходнаСтраница 1 од 2Следна