Shared WHERE for terminal transitions: this job run, and still in-flight (write-once).
(tableId: string, jobId: string)
| 333 | |
| 334 | /** Shared WHERE for terminal transitions: this job run, and still in-flight (write-once). */ |
| 335 | function ownsActiveJob(tableId: string, jobId: string) { |
| 336 | return and( |
| 337 | eq(tableJobs.id, jobId), |
| 338 | eq(tableJobs.tableId, tableId), |
| 339 | eq(tableJobs.status, 'running') |
| 340 | ) |
| 341 | } |
| 342 | |
| 343 | /** |
| 344 | * Marks a job complete. No-op unless it's still this in-flight run. Returns whether it |
no test coverage detected