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