MCPcopy Create free account
hub / github.com/MathMan05/Fermi / scheduleHealthCheck

Function scheduleHealthCheck

src/stats.ts:112–119  ·  view source on GitHub ↗
(instance: Instance, api: string)

Source from the content-addressed store, hash-verified

110}
111
112function scheduleHealthCheck(instance: Instance, api: string): void {
113 const checkInterval = 1000 * 60 * 30;
114 const initialDelay = Math.random() * 1000 * 60 * 10;
115 setTimeout(() => {
116 checkHealth(instance, api);
117 setInterval(() => checkHealth(instance, api), checkInterval);
118 }, initialDelay);
119}
120
121async function checkHealth(instance: Instance, api: string, tries = 0): Promise<void> {
122 try {

Callers 1

resolveInstanceFunction · 0.85

Calls 1

checkHealthFunction · 0.85

Tested by

no test coverage detected