aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/lib/schedulers/remove-old-jobs-scheduler.ts
blob: add5677ac03442e629607220714b5c2c71b89d8b (plain) (tree)


















                                                               
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())
  }
}