Respect defaults when running a paster application

The values of both the 'workers' and 'umask' settings have global
defaults. In the case of 'workers', this global default can be
overridden by the WEB_CONCURRENCY environment variable, which prior to
this commit is ignored by `gunicorn --paste`.

Removing this duplication of defaults allows `gunicorn --paste` to
respect settings from:

- the environment (WEB_CONCURRENCY)
- the paste configuration file
- CLI flags
This commit is contained in:
Nick Stenning 2015-10-15 14:10:49 +02:00
parent 44ac4e457f
commit b135c0570f

View File

@ -44,8 +44,6 @@ def paste_config(gconfig, config_url, relative_to, global_conf=None):
elif host:
cfg['bind'] = host.split(',')
cfg['workers'] = int(lc.get('workers', 1))
cfg['umask'] = int(lc.get('umask', 0))
cfg['default_proc_name'] = gc.get('__file__')
# init logging configuration