(cellContext: {
tableId: string
rowId: string
workspaceId: string
groupId: string
})
| 319 | } |
| 320 | |
| 321 | async function continueCascadeAfterResume(cellContext: { |
| 322 | tableId: string |
| 323 | rowId: string |
| 324 | workspaceId: string |
| 325 | groupId: string |
| 326 | }): Promise<void> { |
| 327 | const { getTableById } = await import('@/lib/table/service') |
| 328 | const { getRowById } = await import('@/lib/table/rows/service') |
| 329 | const { pickNextEligibleGroupForRow } = await import('@/lib/table/workflow-columns') |
| 330 | const { runRowCascadeLoop } = await import('@/background/workflow-column-execution') |
| 331 | |
| 332 | const freshTable = await getTableById(cellContext.tableId) |
| 333 | if (!freshTable) return |
| 334 | const freshRow = await getRowById(cellContext.tableId, cellContext.rowId, cellContext.workspaceId) |
| 335 | if (!freshRow) return |
| 336 | const next = pickNextEligibleGroupForRow(freshTable, freshRow, cellContext.groupId) |
| 337 | if (!next) return |
| 338 | await runRowCascadeLoop({ |
| 339 | tableId: cellContext.tableId, |
| 340 | tableName: freshTable.name, |
| 341 | rowId: cellContext.rowId, |
| 342 | workspaceId: cellContext.workspaceId, |
| 343 | groupId: next.id, |
| 344 | workflowId: next.workflowId, |
| 345 | executionId: generateId(), |
| 346 | }) |
| 347 | } |
| 348 | |
| 349 | export const resumeExecutionTask = task({ |
| 350 | id: 'resume-execution', |
no test coverage detected