MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / startInterval

Method startInterval

src/telemetry/index.ts:318–323  ·  view source on GitHub ↗

* Periodic flush for long-lived processes (MCP daemon / serve). Unref'd so * it never keeps the process alive.

(everyMs: number = 6 * 60 * 60_000)

Source from the content-addressed store, hash-verified

316 * it never keeps the process alive.
317 */
318 startInterval(everyMs: number = 6 * 60 * 60_000): void {
319 if (this.intervalHandle || !this.isEnabled()) return;
320 this.maybeFlush();
321 this.intervalHandle = setInterval(() => this.maybeFlush(), everyMs);
322 this.intervalHandle.unref();
323 }
324
325 stopInterval(): void {
326 if (this.intervalHandle) {

Callers 1

startMethod · 0.80

Calls 2

isEnabledMethod · 0.95
maybeFlushMethod · 0.95

Tested by

no test coverage detected