gunicorn_conf.py 493 B

12345678910111213141516171819202122
  1. import multiprocessing
  2. import sys
  3. _is_pypy = hasattr(sys, 'pypy_version_info')
  4. # only implements json and plain. Not wait DB.
  5. workers = multiprocessing.cpu_count()
  6. bind = "0.0.0.0:8080"
  7. keepalive = 120
  8. errorlog = '-'
  9. pidfile = 'gunicorn.pid'
  10. if _is_pypy:
  11. worker_class = "tornado"
  12. else:
  13. worker_class = "meinheld.gmeinheld.MeinheldWorker"
  14. def post_fork(server, worker):
  15. # Disalbe access log
  16. import meinheld.server
  17. meinheld.server.set_access_logger(None)