-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.py
More file actions
31 lines (24 loc) · 836 Bytes
/
config.py
File metadata and controls
31 lines (24 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
from os.path import dirname, realpath
import faulthandler
faulthandler.enable()
bind = '0.0.0.0'
workers = int(os.environ.get('GUNICORN_WORKERS', 4))
pythonpath = dirname(dirname(dirname(realpath(__file__))))
timeout = 1200
pidfile = '/tmp/gunicorn.pid'
logger_class = 'helmbroker.gunicorn.logging.Logging'
loglevel = 'info'
errorlog = '-'
accesslog = '-'
access_log_format = '%(h)s "%(r)s" %(s)s %(b)s "%(a)s"'
def worker_int(worker):
"""Print a stack trace when a worker receives a SIGINT or SIGQUIT signal."""
worker.log.warning('worker terminated')
import traceback
traceback.print_stack()
def worker_abort(worker):
"""Print a stack trace when a worker receives a SIGABRT signal, generally on timeout."""
worker.log.warning('worker aborted')
import traceback
traceback.print_stack()