Lock video files when generating storyboard
This commit is contained in:
parent
d299afeb2c
commit
1c9dc98c27
|
@ -21,6 +21,9 @@ async function processGenerateStoryboard (job: Job): Promise<void> {
|
|||
|
||||
logger.info('Processing generate storyboard of %s in job %s.', payload.videoUUID, job.id, lTags)
|
||||
|
||||
const inputFileMutexReleaser = await VideoPathManager.Instance.lockFiles(payload.videoUUID)
|
||||
|
||||
try {
|
||||
const video = await VideoModel.loadFull(payload.videoUUID)
|
||||
if (!video) {
|
||||
logger.info('Video %s does not exist anymore, skipping storyboard generation.', payload.videoUUID, lTags)
|
||||
|
@ -91,6 +94,9 @@ async function processGenerateStoryboard (job: Job): Promise<void> {
|
|||
if (payload.federate) {
|
||||
await federateVideoIfNeeded(video, false)
|
||||
}
|
||||
} finally {
|
||||
inputFileMutexReleaser()
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue