reset_all
Method
This is a method of the FailoverManager class in the failover module.Reset all profiles to available status. Clears both the local profile state and any retained coordinator benches. Without clearing the coordinator, a subsequent
get_next_profile() would re-apply the old cooldown via
_sync_bench_from_coordinator() and silently undo the reset.
reset_all() is a deliberate, operator-initiated override that
forces every credential back to AVAILABLE, so the coordinator bench is
cleared unconditionally — unlike mark_success(), which only
recovers from a specific known cooldown and must not clobber a newer
concurrent bench. On a shared coordinator this therefore also clears
benches other replicas may have recorded; that is intended for an
explicit reset.
Fail-open with best-effort durability: a coordinator hiccup must never
wedge the local reset, but a single transient clear() failure must
not silently undo the reset either (the stale bench would be re-imported
on the next get_next_profile()). We therefore verify the clear and
retry once before giving up and warning.
Signature
Uses
profile.resetbenched_untillogger.warning
Source
View on GitHub
praisonaiagents/llm/failover.py at line 526
