aboutsummaryrefslogtreecommitdiffstats
path: root/gunicorn.conf.py
diff options
context:
space:
mode:
authorGravatar RohanJnr <[email protected]>2021-11-05 10:09:35 +0530
committerGravatar RohanJnr <[email protected]>2021-11-05 10:09:35 +0530
commit747a7b9cb465c85a064ac6e1a0444bcf8a81ec65 (patch)
tree1bb529b764bed5c727a3956b7bb432a18ec82d43 /gunicorn.conf.py
parentMerge branch 'main' into otn_softdel (diff)
parentMerge pull request #617 from python-discord/mbaruh-patch-1 (diff)
Pull from upstream/main and resolve conflicts.
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)