2
1

youtube-dl-update-scheduler.ts 587 B

12345678910111213141516171819202122
  1. import { AbstractScheduler } from './abstract-scheduler'
  2. import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants'
  3. import { updateYoutubeDLBinary } from '../../helpers/youtube-dl'
  4. export class YoutubeDlUpdateScheduler extends AbstractScheduler {
  5. private static instance: AbstractScheduler
  6. protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.youtubeDLUpdate
  7. private constructor () {
  8. super()
  9. }
  10. protected internalExecute () {
  11. return updateYoutubeDLBinary()
  12. }
  13. static get Instance () {
  14. return this.instance || (this.instance = new this())
  15. }
  16. }