Skip to content

Commit

Permalink
Added config option for controlling number of uvicorn workers (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogsilva authored Nov 8, 2024
1 parent 2b1decb commit c07a7b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions arpav_ppcv/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ class ArpavPpcvSettings(BaseSettings): # noqa
allow_cors_credentials: bool = False
coverage_download_settings: CoverageDownloadSettings = CoverageDownloadSettings()
variable_stations_db_schema: str = "stations"
num_uvicorn_worker_processes: int = 1

@pydantic.model_validator(mode="after")
def ensure_test_db_dsn(self):
Expand Down
1 change: 1 addition & 0 deletions arpav_ppcv/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def run_server(ctx: typer.Context):
f"--port={settings.bind_port}",
f"--host={settings.bind_host}",
"--factory",
f"--workers={settings.num_uvicorn_worker_processes}",
"--access-log",
]
if settings.debug:
Expand Down

0 comments on commit c07a7b0

Please sign in to comment.