* 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.
()
| 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 { |
no test coverage detected