mirror of
https://github.com/boostorg/website-v2.git
synced 2026-01-19 04:42:17 +00:00
28 lines
583 B
Python
28 lines
583 B
Python
# vim: ft=python
|
|
# pylint: disable=missing-docstring, line-too-long, invalid-name
|
|
import os
|
|
from psycogreen.gevent import patch_psycopg # use this if you use gevent workers
|
|
|
|
|
|
BASE_DIR = os.environ["H"] if os.environ.get("H", None) else "/code"
|
|
|
|
accesslog = "-"
|
|
bind = "unix:/run/gunicorn.sock"
|
|
log_level = "INFO"
|
|
workers = 1
|
|
|
|
worker_class = "gevent"
|
|
keepalive = 32
|
|
worker_connections = 10000
|
|
|
|
pythonpath = BASE_DIR
|
|
chdir = BASE_DIR
|
|
|
|
|
|
def post_fork(server, worker):
|
|
from gevent import monkey
|
|
|
|
patch_psycopg()
|
|
worker.log.info("Made Psycopg2 Green")
|
|
monkey.patch_all()
|