Skip to content

Commit eedb4e9

Browse files
Merge branch 'configure-uvicorn-workers' of github.com:TheCodeWrangler/vllm-production-stack into configure-uvicorn-workers
2 parents de773ac + 70eb3dd commit eedb4e9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/vllm_router/parsers/parser.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,14 @@ def parse_args():
381381
)
382382

383383
# Get default workers from environment variable or use 1
384-
default_workers = int(os.environ.get("VLLM_ROUTER_WORKERS", "1"))
384+
try:
385+
default_workers = int(os.environ.get("VLLM_ROUTER_WORKERS", "1"))
386+
except ValueError:
387+
logger.warning(
388+
"Invalid value for VLLM_ROUTER_WORKERS environment variable. "
389+
"It must be an integer. Defaulting to 1."
390+
)
391+
default_workers = 1
385392

386393
parser.add_argument(
387394
"--workers",

0 commit comments

Comments
 (0)