Merge pull request #686 from benoitc/web-concurrency

Honor $WEB_CONCURRENCY environment variable.
This commit is contained in:
Randall Leeds 2014-02-20 02:17:00 -08:00
commit 6f1d3362c5

View File

@ -507,13 +507,16 @@ 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.
A positive integer generally in the 2-4 x $(NUM_CORES) range. You'll
want to vary this a bit to find the best for your particular
application's work load.
By default, the value of the WEB_CONCURRENCY environment variable. If
it is not defined, the default is 1.
"""