MCPcopy Create free account
hub / github.com/SethGammon/Citadel / schedule

Function schedule

scripts/local-watch.js:71–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69let scanning = false;
70
71function schedule() {
72 if (pending) return;
73 pending = setTimeout(async () => {
74 pending = null;
75 if (scanning) { schedule(); return; }
76 scanning = true;
77 try { await runScan(); } finally { scanning = false; }
78 }, opts.debounce);
79}
80
81console.log(`[local-watch] root: ${ROOT}`);
82console.log(`[local-watch] debounce: ${opts.debounce}ms intake: ${opts.intake}`);

Callers 1

local-watch.jsFile · 0.85

Calls 1

runScanFunction · 0.70

Tested by

no test coverage detected