Skip to content

Commit

Permalink
Support multiple workers per pod.
Browse files Browse the repository at this point in the history
The WORKER_COUNT environment variable now lets the service
configuration request multiple workers per pod.
  • Loading branch information
kfindeisen committed Aug 9, 2024
1 parent 983f133 commit 99a2981
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions config/gunicorn.conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
# Config options
# --------------

workers = 1

threads = 1
worker_class = "sync"

# Normally defined in the Kubernetes config
workers = int(os.environ.get("WORKER_COUNT", 1))
graceful_timeout = int(os.environ.get("WORKER_GRACE_PERIOD", 30))
timeout = int(os.environ.get("WORKER_TIMEOUT", 0))
max_requests = int(os.environ.get("WORKER_RESTART_FREQ", 0))
Expand Down

0 comments on commit 99a2981

Please sign in to comment.