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

Method synthesisHoldMs

src/index.ts:1933–1937  ·  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

1931 * has passed.
1932 */
1933 private synthesisHoldMs(): number {
1934 const interval = parseSynthMinIntervalEnv(process.env.CODEGRAPH_SYNTH_MIN_INTERVAL_MS);
1935 if (!interval || this.lastSynthesisAt === 0) return 0;
1936 return Math.max(0, this.lastSynthesisAt + interval - Date.now());
1937 }
1938
1939 /** Run the synthesis a sync put off once the interval is up, unless a sync runs it first. */
1940 private armDeferredSynthesis(delayMs: number): void {

Callers 1

syncMethod · 0.95

Calls 1

parseSynthMinIntervalEnvFunction · 0.85

Tested by

no test coverage detected