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

Method tryRun

src/mcp/query-pool.ts:560–563  ·  view source on GitHub ↗

* run, but only when a warm worker is idle right now, so the call * starts at once; null, with nothing queued, when every worker is busy or * none has finished its cold start. For a caller that has its own way to * answer and must not wait behind other calls: the prompt hook (#3284)

(toolName: string, args: Record<string, unknown>)

Source from the content-addressed store, hash-verified

558 * queue), so the job goes straight to it.
559 */
560 tryRun(toolName: string, args: Record<string, unknown>): Promise<ToolResult> | null {
561 if (!this.healthy || !this.ready || this.idle.length === 0) return null;
562 return this.run(toolName, args);
563 }
564
565 private startSettled(w: PoolWorker): void {
566 const start = this.starts.get(w);

Callers 2

executeMethod · 0.80

Calls 1

runMethod · 0.95

Tested by

no test coverage detected