( ctx: WriteWorkflowGroupContext, prev: Pick<RowExecutionMetadata, 'workflowId' | 'jobId'> )
| 148 | * trigger.dev queue or actively executing. |
| 149 | */ |
| 150 | export async function markWorkflowGroupPickedUp( |
| 151 | ctx: WriteWorkflowGroupContext, |
| 152 | prev: Pick<RowExecutionMetadata, 'workflowId' | 'jobId'> |
| 153 | ): Promise<'wrote' | 'skipped'> { |
| 154 | return writeWorkflowGroupState(ctx, { |
| 155 | executionState: { |
| 156 | status: 'running', |
| 157 | executionId: ctx.executionId, |
| 158 | jobId: prev.jobId, |
| 159 | workflowId: prev.workflowId, |
| 160 | error: null, |
| 161 | }, |
| 162 | }) |
| 163 | } |
| 164 | |
| 165 | /** Builds the canonical `cancelled` execution state used by every cancel path. |
| 166 | * Preserves `blockErrors` from the prior state so errored cells keep |
no test coverage detected