fix: gate changed sub2api accounts behind sentinel probes
This commit is contained in:
@@ -107,8 +107,8 @@ export function defaultCodexPoolSentinelConfig(): CodexPoolSentinelConfig {
|
||||
jitterPercent: 10,
|
||||
},
|
||||
freeze: {
|
||||
initialTtlMinutes: 2,
|
||||
maxTtlMinutes: 120,
|
||||
initialTtlMinutes: 1,
|
||||
maxTtlMinutes: 10,
|
||||
backoffMultiplier: 2,
|
||||
jitterPercent: 10,
|
||||
},
|
||||
@@ -1149,6 +1149,9 @@ def apply_result(result, state, config, now, admin):
|
||||
except Exception as exc:
|
||||
action = {"taken": False, "type": "restore-failed", "error": str(exc)}
|
||||
account_state["quarantine"] = {"active": False, "clearedAt": iso(now), "lastApplied": quarantine.get("applied") is True}
|
||||
quality_gate = account_state.get("qualityGate") if isinstance(account_state.get("qualityGate"), dict) else None
|
||||
if quality_gate and quality_gate.get("pending") is True:
|
||||
account_state["qualityGate"] = {**quality_gate, "pending": False, "clearedAt": iso(now)}
|
||||
account_state["successStreak"] = 0
|
||||
account_state["successIntervalMinutes"] = 0
|
||||
interval = next_success_interval(account_state, config)
|
||||
|
||||
Reference in New Issue
Block a user