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

Method synthesisHoldMs

src/index.ts:1984–1988  ·  view source on GitHub ↗

* How much longer a sync must wait before it may rebuild the synthesized * edges: the rest of CODEGRAPH_SYNTH_MIN_INTERVAL_MS since this instance last * did (#2911). Zero when the variable is unset or invalid, or the interval * has passed.

()

Source from the content-addressed store, hash-verified

1982 * has passed.
1983 */
1984 private synthesisHoldMs(): number {
1985 const interval = parseSynthMinIntervalEnv(process.env.CODEGRAPH_SYNTH_MIN_INTERVAL_MS);
1986 if (!interval || this.lastSynthesisAt === 0) return 0;
1987 return Math.max(0, this.lastSynthesisAt + interval - Date.now());
1988 }
1989
1990 /** Run the synthesis a sync put off once the interval is up, unless a sync runs it first. */
1991 private armDeferredSynthesis(delayMs: number): void {

Callers 1

syncMethod · 0.95

Calls 1

parseSynthMinIntervalEnvFunction · 0.85

Tested by

no test coverage detected