From 64144c732fe370731c22421d135289b01059d3cd Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 6 Feb 2014 11:44:52 -0800 Subject: [PATCH] Use $WEB_CONCURRENCY environment variable for default workers value --- gunicorn/config.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gunicorn/config.py b/gunicorn/config.py index 2d8d73ac..ee10b9a5 100644 --- a/gunicorn/config.py +++ b/gunicorn/config.py @@ -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.