diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-15 16:52:15 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-15 18:20:56 +0200 |
commit | bbe0f0645ca958d33a3f409b15166609733b663f (patch) | |
tree | edcd5d702c73cda74a2177c4bdc08c616334337d /server/lib/schedulers/update-videos-scheduler.ts | |
parent | 2baea0c77cc765f7cbca9c9a2f4272268892a35c (diff) | |
download | PeerTube-bbe0f0645ca958d33a3f409b15166609733b663f.tar.gz PeerTube-bbe0f0645ca958d33a3f409b15166609733b663f.tar.zst PeerTube-bbe0f0645ca958d33a3f409b15166609733b663f.zip |
Add ability to schedule video publication
Diffstat (limited to 'server/lib/schedulers/update-videos-scheduler.ts')
-rw-r--r-- | server/lib/schedulers/update-videos-scheduler.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/lib/schedulers/update-videos-scheduler.ts b/server/lib/schedulers/update-videos-scheduler.ts index d123c3ceb..a964648fd 100644 --- a/server/lib/schedulers/update-videos-scheduler.ts +++ b/server/lib/schedulers/update-videos-scheduler.ts | |||
@@ -33,7 +33,9 @@ export class UpdateVideosScheduler extends AbstractScheduler { | |||
33 | } | 33 | } |
34 | } | 34 | } |
35 | 35 | ||
36 | private updateVideos () { | 36 | private async updateVideos () { |
37 | if (!await ScheduleVideoUpdateModel.areVideosToUpdate()) return undefined | ||
38 | |||
37 | return sequelizeTypescript.transaction(async t => { | 39 | return sequelizeTypescript.transaction(async t => { |
38 | const schedules = await ScheduleVideoUpdateModel.listVideosToUpdate(t) | 40 | const schedules = await ScheduleVideoUpdateModel.listVideosToUpdate(t) |
39 | 41 | ||