MCPcopy Create free account
hub / github.com/apache/maka / enqueueRunStore

Method enqueueRunStore

packages/runtime/src/agent-run.ts:1572–1585  ·  view source on GitHub ↗
(
    label: string,
    operation: () => Promise<void>,
    options: { rethrow?: boolean } = {},
  )

Source from the content-addressed store, hash-verified

1570 }
1571
1572 private enqueueRunStore(
1573 label: string,
1574 operation: () => Promise<void>,
1575 options: { rethrow?: boolean } = {},
1576 ): Promise<void> {
1577 if (!this.input.runStore || !this.runStoreAvailable) return Promise.resolve();
1578 const next = this.traceQueue.then(operation, operation).catch(async (error) => {
1579 this.runStoreAvailable = false;
1580 await this.enqueueTraceWriteFailure(error, label);
1581 if (options.rethrow) throw error;
1582 });
1583 this.traceQueue = next.catch(() => {});
1584 return next;
1585 }
1586
1587 /**
1588 * Each physical provider request gets its own best-effort diagnostic row.

Callers 8

recordRunTraceMethod · 0.95
markRunStartedMethod · 0.95
markRunFailedMethod · 0.95
markRunCancelledMethod · 0.95
finishRunMethod · 0.95

Calls 2

resolveMethod · 0.65

Tested by

no test coverage detected