openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
13 lines (12 loc) • 568 B
JavaScript
import { r as HEALTH_REFRESH_INTERVAL_MS } from "./server-constants-CYohpfLc.mjs";
//#region src/gateway/server/health-refresh-admission.ts
const backgroundRefreshStartedAt = /* @__PURE__ */ new WeakMap();
/** Shares the existing background cadence across connections and cached health reads. */
function shouldScheduleBackgroundHealthRefresh(e, t) {
const n = backgroundRefreshStartedAt.get(e);
if (n !== void 0 && t - n < 6e4) return false;
backgroundRefreshStartedAt.set(e, t);
return true;
}
//#endregion
export { shouldScheduleBackgroundHealthRefresh as t };