~sircmpwn/core.sr.ht

core.sr.ht/contrib/gunicorn.conf.py -rw-r--r-- 301 bytes
3de3b384Diederik de Haas setup.py: update repo url a day ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
from prometheus_client import multiprocess
import shutil
import os

def on_starting(server):
    multiprocess_dir = os.environ["prometheus_multiproc_dir"]
    shutil.rmtree(multiprocess_dir)
    os.mkdir(multiprocess_dir)

def child_exit(server, worker):
    multiprocess.mark_process_dead(worker.pid)