"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VPWorker = void 0;
const Di_1 = require("../../ioc/Di");
const VPContainerToken_1 = require("../../ioc/VPContainerToken");
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
const constants_1 = require("./constants");
class VPWorker extends workers_1.AbstractWorker {
    constructor() {
        super();
        this.name = constants_1.WORKER_NAME;
        this.registerTask = (task) => {
            super.registerTask(task);
            task.queuePrefix = this.getQueuePrefix();
        };
        // Register tasks
        this.registerTask(Di_1.VPContainer.resolve(VPContainerToken_1.VPContainerToken.RefreshPublicTripCacheTask));
        this.registerTask(Di_1.VPContainer.resolve(VPContainerToken_1.VPContainerToken.RefreshPublicStopTimeCacheTask));
        this.registerTask(Di_1.VPContainer.resolve(VPContainerToken_1.VPContainerToken.RefreshGtfsTripDataTask));
        this.registerTask(Di_1.VPContainer.resolve(VPContainerToken_1.VPContainerToken.SaveDataToDBTask));
        this.registerTask(Di_1.VPContainer.resolve(VPContainerToken_1.VPContainerToken.UpdateGtfsTripIdTask));
        this.registerTask(Di_1.VPContainer.resolve(VPContainerToken_1.VPContainerToken.UpdateRunsGtfsTripIdTask));
        this.registerTask(Di_1.VPContainer.resolve(VPContainerToken_1.VPContainerToken.UpdateDelayTask));
        this.registerTask(Di_1.VPContainer.resolve(VPContainerToken_1.VPContainerToken.ProcessRegionalBusPositionsTask));
        this.registerTask(Di_1.VPContainer.resolve(VPContainerToken_1.VPContainerToken.PropagateDelayTask));
        this.registerTask(Di_1.VPContainer.resolve(VPContainerToken_1.VPContainerToken.PropagateTrainDelayTask));
        this.registerTask(Di_1.VPContainer.resolve(VPContainerToken_1.VPContainerToken.DataRetentionTask));
    }
}
exports.VPWorker = VPWorker;
//# sourceMappingURL=VPWorker.js.map