INNER CODE UNIT · Python

run_http_bridge_heartbeat_maintenance

Soju06/codex-lb · app/main.py:179

async def run_http_bridge_heartbeat_maintenance(proxy_service: Any) -> None:
    """Per-replica bridge upkeep driven by the ring heartbeat.

    All passes are request-independent by design: durable ownership must be
    reconciled even on a replica nothing is routing to, and the idle sweep is
    otherwise only reached from ``_get_or_create_http_bridge_session``, so a
    replica that stops taking bridge requests would keep its idle sessions'
    upstream WebSockets open until restart (issue #1354). Each pass is isolated
    so one failing cannot skip the others or stop the heartbeat.
    """
    if proxy_service is None:
        return
    for attribute, failure_message in (
        ("reconcile_durable_http_bridge_ownership", "HTTP bridge durable ownership reconciliation failed"),
        ("abandon_stale_http_bridge_operations", "HTTP bridge stale operation abandonment failed"),
        ("prune_idle_http_bridge_sessions", "HTTP bridge idle sweep failed"),
    ):
        pass_callable = getattr(proxy_service, attribute, None)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…