UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

2 lines • 690 B
//!src/infra/cron-run-exec-source.ts const MAX_TRACKED_CRON_RUN_SOURCES=512;const activeCronRunExecSources=/* @__PURE__ */ new Map;function registerCronRunExecSource(e,t){const n=e.trim();if(!n)return()=>{};if(activeCronRunExecSources.size>=MAX_TRACKED_CRON_RUN_SOURCES&&!activeCronRunExecSources.has(n)){const e=activeCronRunExecSources.keys().next().value;if(e!==void 0)activeCronRunExecSources.delete(e)}activeCronRunExecSources.set(n,t);return()=>{if(activeCronRunExecSources.get(n)===t)activeCronRunExecSources.delete(n)}}function lookupCronRunExecSource(e){if(!e)return;return activeCronRunExecSources.get(e.trim())}export{registerCronRunExecSource as n,lookupCronRunExecSource as t};