(tableId: string, jobId: string)
| 346 | * cancel / supersede). |
| 347 | */ |
| 348 | export async function markJobReady(tableId: string, jobId: string): Promise<boolean> { |
| 349 | const now = new Date() |
| 350 | const updated = await db |
| 351 | .update(tableJobs) |
| 352 | .set({ status: 'ready', error: null, completedAt: now, updatedAt: now }) |
| 353 | .where(ownsActiveJob(tableId, jobId)) |
| 354 | .returning({ id: tableJobs.id }) |
| 355 | return updated.length > 0 |
| 356 | } |
| 357 | |
| 358 | /** |
| 359 | * Marks a job failed, leaving any already-committed work in place. No-op unless it's still this |
no test coverage detected