gunicorn_conf.py 338 B

123456789101112131415161718
  1. import multiprocessing
  2. import os
  3. import sys
  4. _is_pypy = hasattr(sys, "pypy_version_info")
  5. _is_travis = os.environ.get("TRAVIS") == "true"
  6. workers = int(multiprocessing.cpu_count() * 2.5)
  7. if _is_travis:
  8. workers = 2
  9. bind = "0.0.0.0:8080"
  10. keepalive = 120
  11. errorlog = "-"
  12. pidfile = "gunicorn.pid"
  13. if _is_pypy:
  14. worker_class = "sync"