@magicgakuen · Post #2186 · 03.07.2025 г., 01:24
#胜利女神NIKKE#赫尔姆#GoddessOfVictoryNikke#Helm
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
Пребарај: #helm
@magicgakuen · Post #2186 · 03.07.2025 г., 01:24
#胜利女神NIKKE#赫尔姆#GoddessOfVictoryNikke#Helm
@magicgakuen · Post #2892 · 18.07.2025 г., 05:04
#胜利女神NIKKE#赫尔姆#GoddessOfVictoryNikke#Helm#Ai漫画二次元
@dreamsgallerys · Post #44 · 28.04.2023 г., 17:49
#art#ai#midjourney#knight#medieval#armor#helm
@githubtrending · Post #14942 · 10.07.2025 г., 13:30
#go#chart#charts#cncf#helm#kubernetes Helm is a tool that helps manage applications on Kubernetes. It simplifies deploying and managing apps by using pre-configured packages called Helm Charts. These charts include all the necessary resources for an application, making it easy to install, update, or remove apps with just a few commands. This saves time and reduces errors, as you only need to edit a single file to change settings across different environments. Using Helm boosts productivity and makes deploying complex applications much easier. https://github.com/helm/helm
@githubtrending · Post #14809 · 08.06.2025 г., 13:30
#ruby#beginners#hacktoberfest#hacktoberfest2020#helm#kubernetes#kubetools Kubernetes is a powerful tool for managing containerized applications. To learn Kubernetes, you can use platforms like Kubelabs, which offer interactive tutorials and labs. These resources help you understand Kubernetes concepts from the basics to advanced levels. By using these platforms, you can practice deploying applications, managing resources, and ensuring high availability and scalability. This hands-on approach helps you gain practical experience and improve your skills in managing complex applications efficiently. https://github.com/collabnix/kubelabs
@githubtrending · Post #15595 · 01.04.2026 г., 11:30
#go#distribution_spec#helm#kubernetes#oci#oci_distribution#opencontainers#zot Zot is a lightweight, production-ready OCI-native container registry for storing images, Helm charts, SBOMs, and other artifacts without vendor lock-in. It offers built-in authentication (OIDC, LDAP), storage options (S3, Azure), scanning, caching to cut Docker Hub limits/latency, and ARM/edge support as a single binary. You benefit by easily self-hosting a secure, scalable alternative to Docker Hub, saving costs, boosting speed, and enabling secret-less workflows on any device. https://github.com/project-zot/zot