MCPcopy Index your code
hub / github.com/prometheus/client_python / mark_process_dead

Function mark_process_dead

prometheus_client/multiprocess.py:177–183  ·  view source on GitHub ↗

Do bookkeeping for when one process dies in a multi-process setup.

(pid, path=None)

Source from the content-addressed store, hash-verified

175
176
177def mark_process_dead(pid, path=None):
178 """Do bookkeeping for when one process dies in a multi-process setup."""
179 if path is None:
180 path = os.environ.get('PROMETHEUS_MULTIPROC_DIR', os.environ.get('prometheus_multiproc_dir'))
181 for mode in _LIVE_GAUGE_MULTIPROCESS_MODES:
182 for f in glob.glob(os.path.join(path, f'gauge_{mode}_{pid}.db')):
183 os.remove(f)

Callers 9

test_gauge_allMethod · 0.90
test_gauge_liveallMethod · 0.90
test_gauge_liveminMethod · 0.90
test_gauge_livemaxMethod · 0.90
test_gauge_sumMethod · 0.90
test_gauge_livesumMethod · 0.90
test_gauge_mostrecentMethod · 0.90

Calls 3

joinMethod · 0.80
getMethod · 0.45
removeMethod · 0.45

Tested by 9

test_gauge_allMethod · 0.72
test_gauge_liveallMethod · 0.72
test_gauge_liveminMethod · 0.72
test_gauge_livemaxMethod · 0.72
test_gauge_sumMethod · 0.72
test_gauge_livesumMethod · 0.72
test_gauge_mostrecentMethod · 0.72