1
0
Fork 0
peertube/server/lib/schedulers/remove-old-jobs-scheduler.ts
Chocobozzz 94a5ff8a4a
Move job queue to redis
We'll use it as cache in the future.

/!\ You'll loose your old jobs (pending jobs too) so upgrade only when
you don't have pending job anymore.
2018-01-25 18:41:17 +01:00

19 lines
407 B
TypeScript

import { JobQueue } from '../job-queue'
import { AbstractScheduler } from './abstract-scheduler'
export class RemoveOldJobsScheduler extends AbstractScheduler {
private static instance: AbstractScheduler
private constructor () {
super()
}
async execute () {
JobQueue.Instance.removeOldJobs()
}
static get Instance () {
return this.instance || (this.instance = new this())
}
}