(job: { status: string; startedAt?: Date })
| 504 | } |
| 505 | |
| 506 | function isStaleDatabaseScheduleJob(job: { status: string; startedAt?: Date }): boolean { |
| 507 | return ( |
| 508 | job.status === JOB_STATUS.PROCESSING && |
| 509 | (!job.startedAt || job.startedAt < getStaleScheduleExecutionCutoff(new Date())) |
| 510 | ) |
| 511 | } |
| 512 | |
| 513 | async function getDatabaseScheduleExecutionSlots(): Promise<number> { |
| 514 | const [row] = await db |
no test coverage detected