MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / getBatchResults

Function getBatchResults

packages/trigger-sdk/src/v3/shared.ts:583–599  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

581 span.setAttribute("messaging.message.id", response.batchId);
582
583 const getBatchResults = async (): Promise<BatchTaskRunExecutionResult> => {
584 // We need to check if the results are already available, but only if any of the items options has an idempotency key
585 const hasIdempotencyKey = items.some((item) => item.options?.idempotencyKey);
586
587 if (hasIdempotencyKey) {
588 const results = await apiClient.getBatchResults(response.batchId);
589
590 if (results) {
591 return results;
592 }
593 }
594
595 return {
596 id: response.batchId,
597 items: [],
598 };
599 };
600
601 const existingResults = await getBatchResults();
602

Callers 1

createTaskFunction · 0.85

Calls 1

getBatchResultsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…