github.com/jiasir/deis@v1.12.2/controller/templates/gconf.py (about)

     1  bind = '0.0.0.0'
     2  try:
     3      workers = int({{ if exists "/deis/controller/workers" }}{{ getv "/deis/controller/workers" }}{{ else }}"not set"{{end}})
     4      if workers < 1:
     5          raise ValueError()
     6  except (NameError, ValueError):
     7      import multiprocessing
     8      try:
     9          workers = multiprocessing.cpu_count() * 2 + 1
    10      except NotImplementedError:
    11          workers = 8
    12  timeout = 1200
    13  pidfile = '/tmp/gunicorn.pid'
    14  loglevel = 'info'
    15  errorlog = '-'
    16  accesslog = '-'
    17  access_log_format = '%(h)s "%(r)s" %(s)s %(b)s "%(a)s"'
    18  
    19  
    20  def worker_int(worker):
    21      """Print a stack trace when a worker receives a SIGINT or SIGQUIT signal."""
    22      worker.log.warning('worker terminated')
    23      import traceback
    24      traceback.print_stack()
    25  
    26  
    27  def worker_abort(worker):
    28      """Print a stack trace when a worker receives a SIGABRT signal, generally on timeout."""
    29      worker.log.warning('worker aborted')
    30      import traceback
    31      traceback.print_stack()