mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Honor $WEB_CONCURRENCY environment variable.
Allows for changing concurrency configuration without changing application code. This is an environment variable that other communities (e.g. Rails) are starting to follow, and have enjoyed for a little while now. Have discussed with /cc @benoitc in the past and he was +1
This commit is contained in:
parent
d4f2481384
commit
a8ce74b29b
@ -98,7 +98,8 @@ class Config(object):
|
||||
|
||||
@property
|
||||
def workers(self):
|
||||
return self.settings['workers'].get()
|
||||
env_workers = int(os.environ.get('WEB_CONCURRENCY'))
|
||||
return self.settings['workers'].get() or env_workers
|
||||
|
||||
@property
|
||||
def address(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user