mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-18 12:52:25 +03:00
feat(resilience): default the credential health check sweep to 60 minutes (#12138)
Validado em worktree combinada com typecheck limpo, testes focados verdes, gates de file-size/complexity/cognitive-complexity/cycles OK. Obrigado!
This commit is contained in:
@@ -129,7 +129,7 @@ export function resolveCredentialHealthSweepInterval(
|
||||
const parsed = parseInt(envVal, 10);
|
||||
if (!isNaN(parsed) && parsed >= 10_000) return parsed;
|
||||
}
|
||||
return 300_000; // default 5 min
|
||||
return 3_600_000; // default 60 min
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,7 +142,7 @@ function getSweepInterval(): number {
|
||||
const parsed = parseInt(envVal, 10);
|
||||
if (!isNaN(parsed) && parsed >= 10_000) return parsed;
|
||||
}
|
||||
return 300_000; // default 5 min
|
||||
return 3_600_000; // default 60 min
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -184,10 +184,11 @@ export const DEFAULT_RESILIENCE_SETTINGS: ResilienceSettings = {
|
||||
// default until an operator adds an override here.
|
||||
providerQuotaOverrides: {},
|
||||
// Global default cadence for the background credential health check sweep.
|
||||
// 5 minutes preserves the pre-setting scheduler default (300 000 ms);
|
||||
// 0 disables the sweep entirely. Per-connection overrides always win.
|
||||
// 60 minutes: the sweep makes a real upstream probe against EVERY active
|
||||
// connection, so the previous 5-minute default cost 12 requests/hour per
|
||||
// connection. 0 disables the sweep entirely. Per-connection overrides win.
|
||||
credentialHealthCheck: {
|
||||
intervalMinutes: 5,
|
||||
intervalMinutes: 60,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user