v0 num_workers

This commit is contained in:
ishaan-jaff 2024-01-16 08:15:12 -08:00
parent be1bbb2dcd
commit 7b1c8471c5

View file

@ -472,6 +472,8 @@ def run_server(
# gunicorn app function
return self.application
# before starting server, read num_workers as an env variable
num_workers = os.getenv("NUM_WORKERS", num_workers)
gunicorn_options = {
"bind": f"{host}:{port}",
"workers": num_workers, # default is 1