]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/lib/schedulers/remove-old-jobs-scheduler.ts
Add logs for scheduler
[github/Chocobozzz/PeerTube.git] / server / lib / schedulers / remove-old-jobs-scheduler.ts
1 import { logger } from '../../helpers/logger'
2 import { JobQueue } from '../job-queue'
3 import { AbstractScheduler } from './abstract-scheduler'
4
5 export class RemoveOldJobsScheduler extends AbstractScheduler {
6
7 private static instance: AbstractScheduler
8
9 private constructor () {
10 super()
11 }
12
13 async execute () {
14 logger.info('Removing old jobs (scheduler).')
15
16 JobQueue.Instance.removeOldJobs()
17 }
18
19 static get Instance () {
20 return this.instance || (this.instance = new this())
21 }
22 }