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

Method awaitProjectGate

src/mcp/tools.ts:2632–2645  ·  view source on GitHub ↗
(projectPath: string)

Source from the content-addressed store, hash-verified

2630 }
2631
2632 private async awaitProjectGate(projectPath: string): Promise<void> {
2633 const cg = this.getCodeGraph(projectPath);
2634 if (!this.projectLifecycle || cg === this.cg) return;
2635 let gate = this.projectGates.get(cg);
2636 if (!gate) {
2637 gate = this.projectLifecycle.activate(cg).catch(() => { /* engine logs */ });
2638 this.projectGates.set(cg, gate);
2639 void gate.then(() => {
2640 if (this.projectGates.get(cg) === gate) this.projectGates.delete(cg);
2641 this.trimProjects();
2642 });
2643 }
2644 await this.awaitCatchUpGate(gate);
2645 }
2646
2647 /**
2648 * Never evict a graph while a tool call or its timed-out reconcile uses it.

Callers 1

executeMethod · 0.95

Calls 7

getCodeGraphMethod · 0.95
trimProjectsMethod · 0.95
awaitCatchUpGateMethod · 0.95
activateMethod · 0.80
getMethod · 0.65
deleteMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected