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