OptionalintervalMs: numberOptional override for the warmup interval. When
omitted, the value is resolved from EP_LIFECYCLE_WARMUP_INTERVAL_MS
via resolveLifecycleWarmupIntervalMs (clamped to
[60_000, 3_600_000]). Tests may pass a small value directly.
PrivatefailedPrivateinPrivate ReadonlyintervalPrivatelastPrivatelastPrivatelastPrivatesuccessfulPrivatetimerPrivatetotalStop the periodic refresh and clear the timer. Any in-flight refresh is
left to settle on its own (the underlying getLifecycleStatistics
promise is not cancellable). Safe to call multiple times.
Diagnostic snapshot of the scheduler — consumed by get_server_health.
Run a single warmup attempt immediately.
If a warmup is already in-flight the existing promise is returned so
concurrent callers share the rebuild (de-duplication mirrors the
getLifecycleStatistics in-flight mutex). Errors are logged via
console.error and returned as { kind: 'error' }; they never throw
out of this method so the scheduler stays alive across transient
EP-API failures.
Outcome of the attempt (success counts, in-flight share, or sanitised error message).
Start the periodic refresh. The first refresh runs as soon as the timer
fires (callers wanting immediate priming should await refreshNow()
first). Calling start() more than once is a no-op once running.
The interval is unref()'d so it does not keep the Node.js event loop
alive on its own — CLI scripts and tests can still exit cleanly without
an explicit dispose().
Out-of-band warmup scheduler for the lifecycle-statistics cache.
Typical lifecycle:
refreshNow()returns a promise that callers can await for explicit priming on startup; failures are logged but never thrown so a transient EP-API outage does not crash the server.