PeerTube/server/lib/schedulers/youtube-dl-update-scheduler.ts

23 lines
595 B
TypeScript
Raw Normal View History

import { YoutubeDLCLI } from '@server/helpers/youtube-dl'
import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants'
2021-05-11 03:54:05 -05:00
import { AbstractScheduler } from './abstract-scheduler'
2018-08-02 09:02:51 -05:00
export class YoutubeDlUpdateScheduler extends AbstractScheduler {
private static instance: AbstractScheduler
2021-10-22 03:28:00 -05:00
protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.YOUTUBE_DL_UPDATE
2018-08-02 09:02:51 -05:00
private constructor () {
super()
}
protected internalExecute () {
return YoutubeDLCLI.updateYoutubeDLBinary()
2018-08-02 09:02:51 -05:00
}
static get Instance () {
return this.instance || (this.instance = new this())
}
}