kitsune/wsgi/config.py

22 строки
829 B
Python
Исходник Обычный вид История

# see http://docs.gunicorn.org/en/latest/configure.html#configuration-file
from os import getenv
2022-12-13 11:55:35 +03:00
wsgi_app = "wsgi.app:application"
bind = f"0.0.0.0:{getenv('PORT', 8000)}"
2022-12-13 18:34:32 +03:00
workers = int(getenv("WSGI_NUM_WORKERS", 3))
worker_tmp_dir = getenv("WSGI_WORKER_TMP_DIR", "/dev/shm")
accesslog = "-"
errorlog = "-"
loglevel = getenv("WSGI_LOG_LEVEL", "info")
worker_class = getenv("GUNICORN_WORKER_CLASS", "gevent")
reload = getenv("DEV", False)
2022-12-14 19:39:40 +03:00
# improve fairness
2022-03-29 15:47:54 +03:00
reuse_port = getenv("WSGI_REUSE_PORT", True)
2022-12-14 19:39:40 +03:00
keepalive = int(getenv("WSGI_KEEP_ALIVE", 60))
2022-12-13 18:34:32 +03:00
timeout = int(getenv("WSGI_TIMEOUT", 30))
graceful_timeout = int(getenv("WSGI_GRACEFUL_TIMEOUT", 10))
worker_connections = int(getenv("WSGI_WORKER_CONNECTIONS", 1000))
max_requests = getenv("WSGI_MAX_REQUESTS", 1300)
max_requests_jitter = getenv("WSGI_MAX_REQUESTS_JITTER", 30)