def worker_exit(server, worker): from prometheus_client import multiprocess multiprocess.mark_process_dead(worker.pid)