diff options
Diffstat (limited to 'server/lib/schedulers/update-videos-scheduler.ts')
-rw-r--r-- | server/lib/schedulers/update-videos-scheduler.ts | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/server/lib/schedulers/update-videos-scheduler.ts b/server/lib/schedulers/update-videos-scheduler.ts index fd2edfd17..21f071f9e 100644 --- a/server/lib/schedulers/update-videos-scheduler.ts +++ b/server/lib/schedulers/update-videos-scheduler.ts | |||
@@ -12,23 +12,12 @@ export class UpdateVideosScheduler extends AbstractScheduler { | |||
12 | 12 | ||
13 | protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.updateVideos | 13 | protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.updateVideos |
14 | 14 | ||
15 | private isRunning = false | ||
16 | |||
17 | private constructor () { | 15 | private constructor () { |
18 | super() | 16 | super() |
19 | } | 17 | } |
20 | 18 | ||
21 | async execute () { | 19 | protected async internalExecute () { |
22 | if (this.isRunning === true) return | 20 | return retryTransactionWrapper(this.updateVideos.bind(this)) |
23 | this.isRunning = true | ||
24 | |||
25 | try { | ||
26 | await retryTransactionWrapper(this.updateVideos.bind(this)) | ||
27 | } catch (err) { | ||
28 | logger.error('Cannot execute update videos scheduler.', { err }) | ||
29 | } finally { | ||
30 | this.isRunning = false | ||
31 | } | ||
32 | } | 21 | } |
33 | 22 | ||
34 | private async updateVideos () { | 23 | private async updateVideos () { |