( executionId: string )
| 1029 | * to resume belongs to a table cell — and if so, where to write outputs. |
| 1030 | */ |
| 1031 | export async function findCellContextByExecutionId( |
| 1032 | executionId: string |
| 1033 | ): Promise<CellResumeContext | null> { |
| 1034 | try { |
| 1035 | const [row] = await db |
| 1036 | .select({ metadata: pausedExecutions.metadata }) |
| 1037 | .from(pausedExecutions) |
| 1038 | .where(eq(pausedExecutions.executionId, executionId)) |
| 1039 | .limit(1) |
| 1040 | const meta = row?.metadata as PausedMetadataPatch | null |
| 1041 | return meta?.cellContext ?? null |
| 1042 | } catch (err) { |
| 1043 | logger.error(`Failed to read cell context for executionId=${executionId}:`, err) |
| 1044 | return null |
| 1045 | } |
| 1046 | } |
| 1047 | |
| 1048 | /** |
| 1049 | * Returns groups whose output columns occupy non-contiguous positions in the |
no test coverage detected