INNER CODE UNIT · Python
_log_non_multiproc_metrics_bind_conflict
Soju06/codex-lb · app/main.py:391
def _log_non_multiproc_metrics_bind_conflict(port: int) -> None:
logger.error(
"Metrics port %d is already bound by another worker process but PROMETHEUS_MULTIPROC_DIR is not set: "
"/metrics reflects only the winning worker's counters (1/N of traffic). "
"Set PROMETHEUS_MULTIPROC_DIR to a writable directory shared by all workers to aggregate metrics "
"across worker processes.",
port,
)
async def _close_db_and_record_clean_shutdown(
*,
database_tasks_drained: bool,
leader_lease_release_completed: bool,
) -> None:
"""Dispose the database engines, then record the shutdown as clean.
The record is only reached once disposal returns and every database-owning