1
0
Fork 0
peertube/server/lib/schedulers/youtube-dl-update-scheduler.ts

23 lines
587 B
TypeScript
Raw Normal View History

2018-08-02 10:02:51 -04:00
import { AbstractScheduler } from './abstract-scheduler'
import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants'
2018-09-19 10:24:24 -04:00
import { updateYoutubeDLBinary } from '../../helpers/youtube-dl'
2018-08-02 10:02:51 -04:00
export class YoutubeDlUpdateScheduler extends AbstractScheduler {
private static instance: AbstractScheduler
protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.youtubeDLUpdate
private constructor () {
super()
}
protected internalExecute () {
2018-09-19 10:24:24 -04:00
return updateYoutubeDLBinary()
2018-08-02 10:02:51 -04:00
}
static get Instance () {
return this.instance || (this.instance = new this())
}
}