[BugFix] Fix incorrect metrics shutdown error log message (#18992)

Signed-off-by: Nick Hill <nhill@redhat.com>
This commit is contained in:
Nick Hill 2025-05-31 20:42:23 -07:00 committed by GitHub
parent aa54a7bf7b
commit 2b102d51ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,9 +69,13 @@ def unregister_vllm_metrics():
def shutdown_prometheus():
"""Shutdown prometheus metrics."""
path = _prometheus_multiproc_dir
if path is None:
return
try:
pid = os.getpid()
multiprocess.mark_process_dead(pid)
multiprocess.mark_process_dead(pid, path)
logger.debug("Marked Prometheus metrics for process %d as dead", pid)
except Exception as e:
logger.error("Error during metrics cleanup: %s", str(e))