(dispatchId: string)
| 708 | } |
| 709 | |
| 710 | export async function markDispatchComplete(dispatchId: string): Promise<void> { |
| 711 | await db |
| 712 | .update(tableRunDispatches) |
| 713 | .set({ status: 'complete', completedAt: new Date() }) |
| 714 | .where(eq(tableRunDispatches.id, dispatchId)) |
| 715 | } |
| 716 | |
| 717 | /** Complete a dispatch only if it's still active, returning whether THIS call |
| 718 | * performed the transition. Lets concurrent cells that all hit a hard stop |
no test coverage detected