diff options
Diffstat (limited to 'server/lib/schedulers/update-videos-scheduler.ts')
-rw-r--r-- | server/lib/schedulers/update-videos-scheduler.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/lib/schedulers/update-videos-scheduler.ts b/server/lib/schedulers/update-videos-scheduler.ts index 30bf189db..e38685c04 100644 --- a/server/lib/schedulers/update-videos-scheduler.ts +++ b/server/lib/schedulers/update-videos-scheduler.ts | |||
@@ -53,7 +53,7 @@ export class UpdateVideosScheduler extends AbstractScheduler { | |||
53 | 53 | ||
54 | const video = await sequelizeTypescript.transaction(async t => { | 54 | const video = await sequelizeTypescript.transaction(async t => { |
55 | const video = await VideoModel.loadFull(schedule.videoId, t) | 55 | const video = await VideoModel.loadFull(schedule.videoId, t) |
56 | if (video.state === VideoState.TO_TRANSCODE) return | 56 | if (video.state === VideoState.TO_TRANSCODE) return null |
57 | 57 | ||
58 | logger.info('Executing scheduled video update on %s.', video.uuid) | 58 | logger.info('Executing scheduled video update on %s.', video.uuid) |
59 | 59 | ||
@@ -74,6 +74,10 @@ export class UpdateVideosScheduler extends AbstractScheduler { | |||
74 | return video | 74 | return video |
75 | }) | 75 | }) |
76 | 76 | ||
77 | if (!video) { | ||
78 | return { video, published: false } | ||
79 | } | ||
80 | |||
77 | await addVideoJobsAfterUpdate({ video, oldPrivacy, isNewVideo, nameChanged: false }) | 81 | await addVideoJobsAfterUpdate({ video, oldPrivacy, isNewVideo, nameChanged: false }) |
78 | 82 | ||
79 | return { video, published } | 83 | return { video, published } |