UNPKG

@mondaydotcomorg/atp-compiler

Version:

Production-ready compiler for transforming async iteration patterns into resumable operations with checkpoint-based state management

13 lines 618 B
import { BatchPauseExecutionError } from './errors.js'; import { nextSequenceNumber, getCachedResult, getCallSequenceNumber, } from '@mondaydotcomorg/atp-runtime'; export async function batchParallel(batchCalls, parallelId) { const currentSequence = getCallSequenceNumber(); const cachedResult = getCachedResult(currentSequence); if (cachedResult !== undefined) { nextSequenceNumber(); return cachedResult; } const sequenceForPause = nextSequenceNumber(); throw new BatchPauseExecutionError(batchCalls, parallelId, sequenceForPause); } //# sourceMappingURL=batch-parallel.js.map