Skip to content
Newer
Older
100644 16 lines (9 sloc) 267 Bytes
a168d58 Cleaning up gunicorn configuration a bit for style (pep-8).
Randall Degges authored May 19, 2012
1 """gunicorn WSGI server configuration."""
2
3
30b3e27 Absolute import. Sexy.
Randall Degges authored May 23, 2012
4 from multiprocessing import cpu_count
61d9651 @nanonyme Fix: use PORT environment variable in gunicorn.ini
nanonyme authored May 16, 2012
5 from os import environ
a168d58 Cleaning up gunicorn configuration a bit for style (pep-8).
Randall Degges authored May 19, 2012
6
7
a401ada @nanonyme Rework project root
nanonyme authored May 16, 2012
8 def max_workers():
6c3c67e Reducing gunicorn instances
Randall Degges authored Sep 24, 2012
9 return cpu_count()
a401ada @nanonyme Rework project root
nanonyme authored May 16, 2012
10
a168d58 Cleaning up gunicorn configuration a bit for style (pep-8).
Randall Degges authored May 19, 2012
11
9be635e Binding to all ports.
Randall Degges authored May 21, 2012
12 bind = '0.0.0.0:' + environ.get('PORT', '8000')
148f740 Making gunicorn restart workers after 1k requests.
Randall Degges authored Jun 4, 2012
13 max_requests = 1000
fa30283 Making gunicorn run using gevent.
Randall Degges authored Jun 24, 2012
14 worker_class = 'gevent'
a401ada @nanonyme Rework project root
nanonyme authored May 16, 2012
15 workers = max_workers()
Something went wrong with that request. Please try again.