From e593873f04fd794116a7d7218b2d121828526808 Mon Sep 17 00:00:00 2001 From: Daniel Roberts Date: Thu, 19 Mar 2020 16:00:54 -0500 Subject: [PATCH] Revert breaking prometheus changes to gunicorn_conf.py --- deployment/gunicorn/gunicorn_conf.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/deployment/gunicorn/gunicorn_conf.py b/deployment/gunicorn/gunicorn_conf.py index aa8399de7ad6..668c9e68a008 100644 --- a/deployment/gunicorn/gunicorn_conf.py +++ b/deployment/gunicorn/gunicorn_conf.py @@ -1,6 +1,3 @@ -import glob -import os - preload_app = True worker_class = 'gevent' keepalive = 60 @@ -21,15 +18,3 @@ def post_fork(server, worker): # see: https://github.com/benoitc/gunicorn/issues/527#issuecomment-19601046 from django.urls import resolve resolve('/') - - -def on_starting(server): - """Wipe the metrics from previous processes""" - path = os.environ.get('prometheus_multiproc_dir') - for f in glob.glob(os.path.join(path, '*.db')): - os.remove(f) - - -def child_exit(server, worker): - from prometheus_client import multiprocess - multiprocess.mark_process_dead(worker.pid)