"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PresetWorker = void 0;
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
const CollectAndSaveLogsTask_1 = require("./tasks/CollectAndSaveLogsTask");
const ProcessAndSendLogsTask_1 = require("./tasks/ProcessAndSendLogsTask");
const SavePresetsDataTask_1 = require("./tasks/SavePresetsDataTask");
const Di_1 = require("../../ioc/Di");
const RopidGtfsContainerToken_1 = require("../../ioc/RopidGtfsContainerToken");
class PresetWorker extends workers_1.AbstractWorker {
    constructor() {
        super();
        this.name = "RopidPresets";
        this.registerTask = (task) => {
            super.registerTask(task);
            task.queuePrefix = this.getQueuePrefix();
        };
        // Register tasks
        this.registerTask(new SavePresetsDataTask_1.SavePresetsDataTask(this.getQueuePrefix()));
        this.registerTask(new CollectAndSaveLogsTask_1.CollectAndSaveLogsTask(this.getQueuePrefix()));
        this.registerTask(new ProcessAndSendLogsTask_1.ProcessAndSendLogsTask(this.getQueuePrefix()));
        this.registerTask(Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.CheckForNewDeparturesPresetsTask));
        this.registerTask(Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DownloadDeparturesPresetsTask));
    }
}
exports.PresetWorker = PresetWorker;
//# sourceMappingURL=PresetWorker.js.map