aboutsummaryrefslogtreecommitdiffstats
path: root/gunicorn.conf.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2021-10-06 23:20:56 +0200
committerGravatar Johannes Christ <[email protected]>2021-10-06 23:22:45 +0200
commitce75197fc1d0b2086631277d29f9396908bdc86c (patch)
tree2eab9855ab1a83352a5d83050d8a1fc0524f3285 /gunicorn.conf.py
parentMerge branch 'main' into subdomains-to-query-paths (diff)
parentMerge pull request #599 from python-discord/fix-http-links (diff)
Merge branch 'master' into subdomains-to-query-paths
Diffstat (limited to 'gunicorn.conf.py')
-rw-r--r--gunicorn.conf.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/gunicorn.conf.py b/gunicorn.conf.py
new file mode 100644
index 00000000..4930ae5b
--- /dev/null
+++ b/gunicorn.conf.py
@@ -0,0 +1,10 @@
+"""
+Configuration file for gunicorn.
+
+Code taken from https://github.com/prometheus/client_python#multiprocess-mode-eg-gunicorn
+"""
+from prometheus_client import multiprocess
+
+
+def child_exit(server, worker) -> None:
+ multiprocess.mark_process_dead(worker.pid)