From 7f6510b761d862c13ccb810c484d687a0c2c836e Mon Sep 17 00:00:00 2001 From: bupt_rain Date: Thu, 26 Jun 2025 16:13:49 +0800 Subject: [PATCH] feat: Add multi-worker support for uvicorn deployment - Configure uvicorn to support multiple worker processes - Add worker count configuration via environment variables - Optimize Docker deployment for better resource utilization - Enable horizontal scaling within single container instance Improves application throughput and CPU utilization on multi-core systems. --- src/mcpo/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mcpo/main.py b/src/mcpo/main.py index 2da53cc..f2b047a 100644 --- a/src/mcpo/main.py +++ b/src/mcpo/main.py @@ -422,6 +422,7 @@ async def safe_lifespan(app: FastAPI): os.makedirs(worker_npx_cache, exist_ok=True) worker_env = {**env} + logger.info(f"worker_env after copy ({len(worker_env)} items):") worker_env.update({ "NPM_CONFIG_CACHE": worker_npm_cache, "npm_config_cache": worker_npm_cache,