feat: Factor out some uvicorn settings as environment variables (#1266)

This commit is contained in:
Matthew Zhou
2025-03-13 12:26:50 -07:00
committed by GitHub
parent e29f333cbe
commit 4eaa410139
2 changed files with 11 additions and 0 deletions

View File

@@ -322,6 +322,9 @@ def start_server(
app,
host=host or "localhost",
port=port or REST_DEFAULT_PORT,
workers=settings.uvicorn_workers,
reload=settings.uvicorn_reload,
timeout_keep_alive=settings.uvicorn_timeout_keep_alive,
ssl_keyfile="certs/localhost-key.pem",
ssl_certfile="certs/localhost.pem",
)
@@ -338,4 +341,7 @@ def start_server(
app,
host=host or "localhost",
port=port or REST_DEFAULT_PORT,
workers=settings.uvicorn_workers,
reload=settings.uvicorn_reload,
timeout_keep_alive=settings.uvicorn_timeout_keep_alive,
)