blob: 473544ddfff1d78ba23ed5861f4597c9be779b11 (
plain) (
tree)
|
|
import { SCHEDULER_INTERVAL } from '../../initializers'
export abstract class AbstractScheduler {
private interval: NodeJS.Timer
enable () {
this.interval = setInterval(() => this.execute(), SCHEDULER_INTERVAL)
}
disable () {
clearInterval(this.interval)
}
protected abstract execute ()
}
|