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

Method awaitProjectGate

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

Source from the content-addressed store, hash-verified

2604 }
2605
2606 private async awaitProjectGate(projectPath: string): Promise<void> {
2607 const cg = this.getCodeGraph(projectPath);
2608 if (!this.projectLifecycle || cg === this.cg) return;
2609 let gate = this.projectGates.get(cg);
2610 if (!gate) {
2611 gate = this.projectLifecycle.activate(cg).catch(() => { /* engine logs */ });
2612 this.projectGates.set(cg, gate);
2613 void gate.then(() => {
2614 if (this.projectGates.get(cg) === gate) this.projectGates.delete(cg);
2615 this.trimProjects();
2616 });
2617 }
2618 await this.awaitCatchUpGate(gate);
2619 }
2620
2621 /**
2622 * 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