mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Use $WEB_CONCURRENCY environment variable for default workers value
This commit is contained in:
parent
a8ce74b29b
commit
64144c732f
@ -98,8 +98,7 @@ class Config(object):
|
||||
|
||||
@property
|
||||
def workers(self):
|
||||
env_workers = int(os.environ.get('WEB_CONCURRENCY'))
|
||||
return self.settings['workers'].get() or env_workers
|
||||
return self.settings['workers'].get()
|
||||
|
||||
@property
|
||||
def address(self):
|
||||
@ -508,7 +507,7 @@ class Workers(Setting):
|
||||
meta = "INT"
|
||||
validator = validate_pos_int
|
||||
type = int
|
||||
default = 1
|
||||
default = int(os.environ.get('WEB_CONCURRENCY', 1))
|
||||
desc = """\
|
||||
The number of worker process for handling requests.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user