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

Резултати

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

Пребарај: #los

当前筛选 #los清除筛选
Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #493 · 21.12.2024 г., 05:55

LineageOS - Community | Android 15 | Nothing Phone (2) ✍️ Details: - Version: lineage 22.1 - Codename: #Pong - Released: 11/12/24 🔽 Download: Recovery build 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#LOS#V#Community ✍️ Note: - Meteoric kernel is baked in with prepatched KSU - Vanilla build: Recommended Gapps 🏆 Credits - Chandu for base DT - Hellboy for Meteoric kernel - Fabian and Hellboy for PA Glyph Implementation - Testers: @Devasee@notnaito 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #461 · 26.10.2024 г., 09:09

LineageOS - Community | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 22.0 - Codename: #Pong - Released: 26/10/24 🔽 Download: [ Here ] (Sideload/Flash via orangefox recovery) 🆘 Support : Here ⚙️ Installation: Here 📸 Screenshots: Here ✨ Source Changelogs: Here 🔖 Tags : #ROM#AOSP#LOS#V#Community ✨ Changelogs - Initial build ✍️ Note: - Meteoric kernel is baked in with prepatched KSU - vanilla build: Recommended Gapps 🏆 Credits - Chandu for base DT - Hellboy for Meteoric kernel - Fabian for PA Glyph Implementation - Testers: @Sergio_Boscolo 😎 Maintainer : @Drishal 🔔 Updates : @NothingPhone2Updates 💬 Chat : @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #692 · 18.11.2025 г., 20:51

crDroid - Unofficial | Android 16 | Nothing Phone (2) 📝 Details: - Version: v12.3 - Device: #Pong - Released: 15/11/25 ⬇️ Downloads: ROM and Recovery Image ⚙️ Flashing Instructions: Here 📖 Changelogs: Here 🏷 Tags: #LOS#ROM#crDroid#Unofficial ✍️Notes: - GAPPS and Vanilla builds available - Dolby and initial Nothing camera support available - WFD broken - SukiSU Ultra with SUSFS out of the box - OTA updates are supported - Signed with release-keys - Use latest NOS 3 firmware - If face any bugs report with logs 🏆Credits: - Ghost and Chandu for DT - Fabian & HELLBOY for Glyph - HELLBOY for Meteoric Kernel 👤 Maintainer: @deadlylxrd 💬 Chat: @NothingPhone2 🔔 Updates: @NothingPhone2Updates

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #656 · 27.07.2025 г., 18:35

Lineage OS - Official | Nothing Phone (2) ✍️ Details: - Version: 22.2 - Codename: #Pong - Initial Build: 27/07/25 - Build Freq: Weeklies (Search for #Pong) 🔽 Download: ROM & Images | GAPPS (sideload) | Unofficial MicroG Builds ⚙️ Wiki: Here 🤝 Thanks: Here 📓 Reference: Here 🔖 Tags: #ROM#LOS#Official#V#Vanilla ❌ Known quirks: - Device Integrity ~ As always thanks Goolag! 👤 Maintainer: @Chandu_078 🐙 Chat: @NothingPhone2 🔔 Updates: @NothingPhone2Updates

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #411 · 28.08.2024 г., 12:59

OrionOS Project - OFFICIAL | A14 | Nothing Phone (2) Based on LineageOS & crDroidAndroid 📔 Details: - Version: Centauri - Codename: #Pong - Released: 28/08/2024 🔽 Download (Recovery) : Vanilla | Gapps ⚙️ Installation: Here 📸 Screenshots: Here 🆘 Support: Telegram 🔖 Tags : #ROM#LOS#Official#QPR3#U#NothingPhone2 ✍️ Changelog: - OTA Already Released - August Security Patch - Synced with Latest Source Changes ✍️ Note: - Kernel is prepatched with KSU (Download Manager) - Clean flashing is mandatory - Both Vanilla & Gapps Build Available ‼️ Known Bugs: - None 🏆 Credits - Chandu for base device tree & Kernel - OC'D, Miki, Unluck & Ghost for all help - Fabian & Hellboy for PA Glyph Implementation - Testers 😎 Maintainer: @AgBKartikey 🔔 Updates: @NothingPhone2Updates 💬 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #382 · 05.08.2024 г., 15:31

OrionOS Project - OFFICIAL | A14 | Nothing Phone (2) Based on LineageOS & crDroidAndroid 📔 Details: - Version: Cosmic - Codename: #Pong - Released: 05/08/2024 🔽 Download (Recovery) : Vanilla | Gapps ⚙️ Installation: Here 📸 Screenshots: Here 🆘 Support: Telegram 🔖 Tags : #ROM#LOS#Official#QPR3#U#NothingPhone2 ✍️ Changelog: - Tuned Lock Screen Status Bar Padding - Fixed OTA Install Error (Users need to flash this build manually with recovery.. Future updates will be OTA) - Fixed Gapps Flash Error (Vanilla Build) ✍️ Note: - Kernel is prepatched with KSU (Download Manager) - Clean flashing is mandatory - Both Vanilla & Gapps Build Available ‼️ Known Bugs: - None 🏆 Credits - Chandu for base device tree & Kernel - OC'D, Miki, Unluck & Ghost for all help - Fabian & Hellboy for PA Glyph Implementation - Testers 😎 Maintainers: @AgBKartikey 🔔 Updates: @NothingPhone2Updates 💬 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #381 · 04.08.2024 г., 11:17

OrionOS Project - OFFICIAL | A14 | Nothing Phone (2) Based on LineageOS & crDroidAndroid 📔 Details: - Version: Cosmic - Codename: #Pong - Released: 04/08/2024 🔽 Download (Recovery) : Vanilla | Gapps ⚙️ Installation: Here 📸 Screenshots: Here 🆘 Support: Telegram 🔖 Tags : #ROM#LOS#Official#QPR3#U#NothingPhone2 ✍️ Note: - Kernel is prepatched with KSU (Download Manager) - Clean flashing is mandatory - Both Vanilla & Gapps Build Available - Powershare (Wireless Reverse Charging) - Auto brightness in Glyph - X-Reality Engine in Colors - MicroG should pass Integrity (Not tested) - Game Space - Battery Backup was pretty decent during testing.. Wait for a charging cycle to complete.. ‼️ Known Bugs: - Lock Screen Carrier Text is a bit right.. Would be fixed with next OTA of August SP 🏆 Credits - Chandu for base device tree & Kernel - OC'D, Miki, Unluck & Ghost for all help - Fabian & Hellboy for PA Glyph - Testers 😎 Maintainers: @AgBKartikey 🔔 Updates: @NothingPhone2Updates 💬 Chat: @NothingPhone2

Oneplus 13 Updates

@OnePlus13Series · Post #373 · 24.01.2026 г., 03:52

LineageOS - Official | Android 16 | Oneplus 13 ✍️ Details: - Version: 23 - Codename: #dodge - Variant: #Vanilla - Released: 23 Jan 🔽 Download : Here | Gapps 📃 Changelogs: Here ⚙️ Installation: Here 🌳 Sources: DT | Kernel 🔖 Tags: #LOS#Official#ROM#Baklava 📔 Notes: Broken: eSim, Device Integrity 👤 Maintainers: @bgcngm, chandu078, dianlujitao, ItsVixano 🔔 Updates: @OnePlus13Series 💬 Discussion: @OnePlus13SeriesChatRoom

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #525 · 23.01.2025 г., 11:46

Lineage OS - Unofficial | Android 15 | Nothing Phone (2) ✍️ Details: - Version: 22.1 - Codename: #Pong - Released: 23/1/24 🔽 Download: ROM & Images | Gapps (sideload) ⚙️ Installation: Here 🔖 Tags : #ROM#LOS#Unofficial#V#Vanilla ✨Changelog: - Initial build based on Android 15 and NOS V3.0-250113-1723 - https://t.me/NothingPhone2updates/528 👤 Dev: @Chandu_Dyavanapelli 🐙 Chat @NothingPhone2 🔔 Updates @NothingPhone2Updates

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #441 · 24.09.2024 г., 07:02

LineageOS - UNOFFICIAL | A14 | Nothing Phone (2) 📔 Details: - Version: 21.0 - Codename: #Pong - Released: 24/09/2024 🔽 Download (Recovery) : Vanilla ⚙️ Installation: Here 📸 Screenshots: Here 🆘 Support: Telegram 🔖 Tags : #ROM#Unofficial#LOS#QPR3#U#NothingPhone2 ✍️ Changelogs: - Gapps Flashing Error Fixed - Dolby & Dirac Removed ✍️ Note: - Stable Signed Build - GKI Kernel is prepatched with KSU (Download Manager) - Clean flashing is recommended - Flash Gapps 🏆 Credits - Chandu for base device tree & Kernel - OC'D,Miki,Unluck & Ghost for all help - Fabian & Hellboy for PA Glyph Implementation - Testers 😎 Maintainers: @Kartikey 🔔 Updates: @NothingPhone2Updates 💬 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #437 · 15.09.2024 г., 03:54

LineageOS - UNOFFICIAL | A14 | Nothing Phone (2) 📔 Details: - Version: 21.0 - Codename: #Pong - Released: 15/09/2024 🔽 Download (Recovery) : Vanilla ⚙️ Installation: Here 📸 Screenshots: Here 🆘 Support: Telegram 🔖 Tags : #ROM#Unofficial#LOS#QPR3#U#NothingPhone2 ✍️ Changelogs: - September Security Patch - Nothing Charging Control - OTG Compatibility - Glyph Improvements - BCR Updated ✍️ Note: - Stable Signed Build - GKI Kernel is prepatched with KSU (Download Manager) - Clean flashing is mandatory - Dolby Included - Flash Gapps 🏆 Credits - Chandu for base device tree & Kernel - OC'D, Miki, Unluck & Ghost for all help - Fabian & Hellboy for PA Glyph Implementation - Testers 😎 Maintainers: @Kartikey 🔔 Updates: @NothingPhone2Updates 💬 Chat: @NothingPhone2

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #415 · 30.08.2024 г., 19:29

LineageOS - UNOFFICIAL | A14 | Nothing Phone (2) 📔 Details: - Version: 21.0 - Codename: #Pong - Released: 31/08/2024 🔽 Download (Recovery) : Vanilla ⚙️ Installation: Here 📸 Screenshots: Here 🆘 Support: Telegram 🔖 Tags : #ROM#AOSP#Official#LOS#QPR3#U#NothingPhone2 ✍️ Changelogs: - Switched to GKI Kernel - Updated Dolby Atmos - BCR Included - Introduced Battery Tile - Glyph Improvements - Brightness Slider Issue Fixed - Tuned Status Bar Padding ✍️ Note: - Stable Signed Build - GKI Kernel is prepatched with KSU (Download Manager) - Clean flashing is mandatory - Flash Gapps 🏆 Credits - Chandu for base device tree & Kernel - OC'D, Miki, Unluck & Ghost for all help - Fabian & Hellboy for PA Glyph Implementation - Testers 😎 Maintainers: @Kartikey 🔔 Updates: @NothingPhone2Updates 💬 Chat: @NothingPhone2

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