Skip to content

Commit 9ebdb57

Browse files
derekhigginsclaude
andauthored
feat(cli): support OGX_WORKERS env var to override worker count (#6221)
## Summary - Add `OGX_WORKERS` environment variable to override the configured worker count, matching the existing `OGX_PORT` pattern. ## Test plan - Set `OGX_WORKERS=4` and verify uvicorn starts with 4 workers - Unset `OGX_WORKERS` and verify the config value is used Signed-off-by: Derek Higgins <derekh@redhat.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0a386e9 commit 9ebdb57

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ogx/cli/stack/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ def _uvicorn_run(config_file: Path | None, args: argparse.Namespace, parser: arg
153153

154154
env_port = os.getenv("OGX_PORT")
155155
port = args.port or (int(env_port) if env_port else None) or config.server.port
156-
workers = config.server.workers
156+
env_workers = os.getenv("OGX_WORKERS")
157+
workers = (int(env_workers) if env_workers else None) or config.server.workers
157158

158159
host = ""
159160
if config.server.host:

0 commit comments

Comments
 (0)