Merge branch 'develop' into cli-wrapper
[oweals/peertube.git] / server / lib / schedulers / youtube-dl-update-scheduler.ts
1 import { AbstractScheduler } from './abstract-scheduler'
2 import { SCHEDULER_INTERVALS_MS } from '../../initializers'
3 import { updateYoutubeDLBinary } from '../../helpers/youtube-dl'
4
5 export class YoutubeDlUpdateScheduler extends AbstractScheduler {
6
7   private static instance: AbstractScheduler
8
9   protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.youtubeDLUpdate
10
11   private constructor () {
12     super()
13   }
14
15   execute () {
16     return updateYoutubeDLBinary()
17   }
18
19   static get Instance () {
20     return this.instance || (this.instance = new this())
21   }
22 }