]>
Commit | Line | Data |
---|---|---|
1 | import { YoutubeDLCLI } from '@server/helpers/youtube-dl' | |
2 | import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants' | |
3 | import { AbstractScheduler } from './abstract-scheduler' | |
4 | ||
5 | export class YoutubeDlUpdateScheduler extends AbstractScheduler { | |
6 | ||
7 | private static instance: AbstractScheduler | |
8 | ||
9 | protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.YOUTUBE_DL_UPDATE | |
10 | ||
11 | private constructor () { | |
12 | super() | |
13 | } | |
14 | ||
15 | protected internalExecute () { | |
16 | return YoutubeDLCLI.updateYoutubeDLBinary() | |
17 | } | |
18 | ||
19 | static get Instance () { | |
20 | return this.instance || (this.instance = new this()) | |
21 | } | |
22 | } |