MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / schedule

Function schedule

src/core/embedding-tracker.ts:77–83  ·  view source on GitHub ↗
(delay: number = debounceMs)

Source from the content-addressed store, hash-verified

75 let closed = false;
76
77 const schedule = (delay: number = debounceMs): void => {
78 if (timer) clearTimeout(timer);
79 timer = setTimeout(() => {
80 void flushPending();
81 }, delay);
82 timer.unref();
83 };
84
85 const flushPending = async (): Promise<void> => {
86 if (closed || isProcessing) return;

Callers 2

flushPendingFunction · 0.70
startEmbeddingTrackerFunction · 0.70

Calls 1

flushPendingFunction · 0.85

Tested by

no test coverage detected