Member Junction
    Preparing search index...

    Function StartBridgeOrphanReconciliation

    • Starts the realtime bridge engine's orphan reconcile: now, then every settings.sweepIntervalMs (10 minutes by default), it closes the bridges an earlier boot of this instance left Connecting or Connected (reason Janitor) and finalizes their co-agent runs. With settings.enabled false it reconciles once now and schedules no repeat, so an idle server sends no periodic queries for it (agentSessions.bridgeReconciler; see the Serverless Database Auto-Pause guide).

      Serve calls it once the server listens on its port, where it starts the session janitor. Holding the port is what makes another boot of this instance a process that has ended; before that, an MJAPI started on a port another MJAPI still serves would take that one's live bridges for its own orphans.

      Parameters

      • provider: IMetadataProvider

        The server's metadata provider, for the reads and writes.

      • systemUser: UserInfo

        The user the writes run as.

      • settings: { enabled?: boolean; sweepIntervalMs?: number } = DEFAULT_BRIDGE_RECONCILER_SETTINGS

        Whether to repeat the reconcile, and how often. Defaults to the shipped settings.

      Returns void