MCPcopy
hub / github.com/simstudioai/sim / schedulePartialWrite

Function schedulePartialWrite

apps/sim/background/workflow-column-execution.ts:684–712  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

682 const runningBlockIds = new Set<string>()
683
684 const schedulePartialWrite = () => {
685 if (terminalWritten) return
686 const dataSnapshot: RowData = { ...accumulatedData }
687 const blockErrorsSnapshot = { ...blockErrors }
688 const runningSnapshot = Array.from(runningBlockIds)
689 writeChain = writeChain
690 .then(async () => {
691 if (signal?.aborted) return
692 if (terminalWritten) return
693 await writeState(
694 {
695 status: 'running',
696 executionId,
697 jobId: null,
698 workflowId,
699 error: null,
700 runningBlockIds: runningSnapshot,
701 blockErrors: blockErrorsSnapshot,
702 },
703 dataSnapshot
704 )
705 })
706 .catch((err) => {
707 logger.warn(
708 `Per-block partial write failed (table=${tableId} row=${rowId} group=${groupId})`,
709 { cause: describeError(err), retryable: isRetryableInfrastructureError(err) }
710 )
711 })
712 }
713
714 const onBlockStart = async (blockId: string): Promise<void> => {
715 if (!outputsByBlockId.has(blockId)) return

Callers 2

onBlockStartFunction · 0.85
onBlockCompleteFunction · 0.85

Calls 4

describeErrorFunction · 0.90
writeStateFunction · 0.85
warnMethod · 0.65

Tested by

no test coverage detected