View Source ProcessHub.Service.Recovery.Round (ProcessHub v0.7.0)
One orphan reconcile round: takes the declared list as the candidate set, starts the unaccounted remainder, stops undeclared runners, cleans stale rows, and resolves duplicate bindings. A parked list yields no starts and no stops — a lost list must never be mistaken for "nothing declared".
Summary
Functions
Runs one round, converting any crash into a :crashed result — the caller
relies on always receiving a result, whatever happened. A registry or peer
call that times out exits rather than raising, hence the catch.
Types
@type result() :: %{ candidates: non_neg_integer(), orphans: non_neg_integer(), started: non_neg_integer(), skipped_pending: non_neg_integer(), duplicates: non_neg_integer(), stopped_undeclared: non_neg_integer(), deferred_undeclared: non_neg_integer(), removed_stale: non_neg_integer(), elapsed_ms: non_neg_integer(), reason: :completed | :parked | :draining | :crashed }
Result of one orphan reconcile round.
Functions
@spec run_safe(ProcessHub.Hub.t(), boolean()) :: result()
Runs one round, converting any crash into a :crashed result — the caller
relies on always receiving a result, whatever happened. A registry or peer
call that times out exits rather than raising, hence the catch.