"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RemoveOldJobsScheduler = void 0;
const core_utils_1 = require("../../helpers/core-utils");
const logger_1 = require("../../helpers/logger");
const constants_1 = require("../../initializers/constants");
const job_queue_1 = require("../job-queue");
const abstract_scheduler_1 = require("./abstract-scheduler");
class RemoveOldJobsScheduler extends abstract_scheduler_1.AbstractScheduler {
    constructor() {
        super();
        this.schedulerIntervalMs = constants_1.SCHEDULER_INTERVALS_MS.REMOVE_OLD_JOBS;
    }
    internalExecute() {
        if (!(0, core_utils_1.isTestOrDevInstance)())
            logger_1.logger.info('Removing old jobs in scheduler.');
        return job_queue_1.JobQueue.Instance.removeOldJobs();
    }
    static get Instance() {
        return this.instance || (this.instance = new this());
    }
}
exports.RemoveOldJobsScheduler = RemoveOldJobsScheduler;
//# sourceMappingURL=remove-old-jobs-scheduler.js.map