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

Method awaitProjectGate

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

Source from the content-addressed store, hash-verified

2789 }
2790
2791 private async awaitProjectGate(projectPath: string): Promise<void> {
2792 const cg = this.getCodeGraph(projectPath);
2793 if (!this.projectLifecycle || cg === this.cg) return;
2794 let gate = this.projectGates.get(cg);
2795 if (!gate) {
2796 gate = this.projectLifecycle.activate(cg).catch(() => { /* engine logs */ });
2797 this.projectGates.set(cg, gate);
2798 void gate.then(() => {
2799 if (this.projectGates.get(cg) === gate) this.projectGates.delete(cg);
2800 this.trimProjects();
2801 });
2802 }
2803 await this.awaitCatchUpGate(gate);
2804 }
2805
2806 /**
2807 * 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