mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Add ability for uploaders to schedule video update
This commit is contained in:
parent
bf079b7bfd
commit
2baea0c77c
21 changed files with 469 additions and 22 deletions
|
@ -1,11 +1,13 @@
|
|||
import { SCHEDULER_INTERVAL } from '../../initializers'
|
||||
|
||||
export abstract class AbstractScheduler {
|
||||
|
||||
protected abstract schedulerIntervalMs: number
|
||||
|
||||
private interval: NodeJS.Timer
|
||||
|
||||
enable () {
|
||||
this.interval = setInterval(() => this.execute(), SCHEDULER_INTERVAL)
|
||||
if (!this.schedulerIntervalMs) throw new Error('Interval is not correctly set.')
|
||||
|
||||
this.interval = setInterval(() => this.execute(), this.schedulerIntervalMs)
|
||||
}
|
||||
|
||||
disable () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue