1 import { isTestInstance } from '../../helpers/core-utils'
2 import { logger } from '../../helpers/logger'
3 import { JobQueue } from '../job-queue'
4 import { AbstractScheduler } from './abstract-scheduler'
6 export class RemoveOldJobsScheduler extends AbstractScheduler {
8 private static instance: AbstractScheduler
10 private constructor () {
15 if (!isTestInstance()) logger.info('Removing old jobs (scheduler).')
17 JobQueue.Instance.removeOldJobs()
20 static get Instance () {
21 return this.instance || (this.instance = new this())