More robust transcription error job handler
This commit is contained in:
parent
85678854c2
commit
ebcf3329f5
|
@ -123,6 +123,9 @@ export async function generateSubtitle (options: {
|
|||
} finally {
|
||||
if (outputPath) await remove(outputPath)
|
||||
|
||||
VideoJobInfoModel.decrease(options.video.uuid, 'pendingTranscription')
|
||||
.catch(err => logger.error('Cannot decrease pendingTranscription job count', { err, ...lTags(options.video.uuid) }))
|
||||
|
||||
inputFileMutexReleaser()
|
||||
}
|
||||
}
|
||||
|
@ -135,8 +138,6 @@ export async function onTranscriptionEnded (options: {
|
|||
}) {
|
||||
const { video, language, vttPath, lTags: customLTags = [] } = options
|
||||
|
||||
await VideoJobInfoModel.decrease(video.uuid, 'pendingTranscription')
|
||||
|
||||
if (!isVideoCaptionLanguageValid(language)) {
|
||||
logger.warn(`Invalid transcription language for video ${video.uuid}`, this.lTags(video.uuid))
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue