Skip to content

Commit 60694fa

Browse files
committed
partial fix
1 parent 0859ebb commit 60694fa

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

prometheus_client/multiprocess.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class MultiProcessCollector(object):
2323

2424
def __init__(self, registry, path=None):
2525
if path is None:
26-
path = os.environ.get('prometheus_multiproc_dir')
26+
path = os.environ.get('PROMETHEUS_MULTIPROC_DIR')
2727
if not path or not os.path.isdir(path):
28-
raise ValueError('env prometheus_multiproc_dir is not set or not a directory')
28+
raise ValueError('env PROMETHEUS_MULTIPROC_DIR is not set or not a directory')
2929
self._path = path
3030
if registry:
3131
registry.register(self)
@@ -152,7 +152,7 @@ def collect(self):
152152
def mark_process_dead(pid, path=None):
153153
"""Do bookkeeping for when one process dies in a multi-process setup."""
154154
if path is None:
155-
path = os.environ.get('prometheus_multiproc_dir')
155+
path = os.environ.get('PROMETHEUS_MULTIPROC_DIR')
156156
for f in glob.glob(os.path.join(path, 'gauge_livesum_{0}.db'.format(pid))):
157157
os.remove(f)
158158
for f in glob.glob(os.path.join(path, 'gauge_liveall_{0}.db'.format(pid))):

0 commit comments

Comments
 (0)