fix: users can retriger transcription

This commit is contained in:
Rotimi Best
2026-05-20 14:07:45 +01:00
parent e66a8d8441
commit fe455dd3f7
5 changed files with 116 additions and 8 deletions
+11
View File
@@ -16,3 +16,14 @@ export const ZDeadLetterCleanupPayload = z.object({
olderThanDays: z.number().int().positive().default(180)
});
export type TDeadLetterCleanupPayload = z.infer<typeof ZDeadLetterCleanupPayload>;
/**
* Sweep `media_job` rows that are still `queued` / `running` but haven't been
* touched in `staleAfterMinutes`. Marks them `failed` so the active-job guard
* stops blocking new runs after a worker crash, server restart, or lost
* BullMQ job.
*/
export const ZMediaJobReapPayload = z.object({
staleAfterMinutes: z.number().int().positive().default(30)
});
export type TMediaJobReapPayload = z.infer<typeof ZMediaJobReapPayload>;
+2 -1
View File
@@ -37,6 +37,7 @@ export const JOB_NAMES = {
},
maintenance: {
retentionCompact: 'retention-compact',
deadLetterCleanup: 'dead-letter-cleanup'
deadLetterCleanup: 'dead-letter-cleanup',
mediaJobReap: 'media-job-reap'
}
} as const;