"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.JISWorker = void 0;
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
const Di_1 = require("../ioc/Di");
const JISContainerToken_1 = require("../ioc/JISContainerToken");
const constants_1 = require("./constants");
class JISWorker extends workers_1.AbstractWorker {
    constructor() {
        super();
        this.name = constants_1.JIS_WORKER_NAME.toLowerCase();
        this.registerTask = (task) => {
            super.registerTask(task);
            task.queuePrefix = this.getQueuePrefix();
        };
        // Register tasks
        this.registerTask(Di_1.JISContainer.resolve(JISContainerToken_1.JISContainerToken.FetchJISEventsTask));
        this.registerTask(Di_1.JISContainer.resolve(JISContainerToken_1.JISContainerToken.FetchJISInfotextsTask));
        this.registerTask(Di_1.JISContainer.resolve(JISContainerToken_1.JISContainerToken.RefreshJISEventsTask));
        this.registerTask(Di_1.JISContainer.resolve(JISContainerToken_1.JISContainerToken.RefreshJISInfotextsTask));
        this.registerTask(Di_1.JISContainer.resolve(JISContainerToken_1.JISContainerToken.RefreshJISInfotextsCacheTask));
        this.registerTask(Di_1.JISContainer.resolve(JISContainerToken_1.JISContainerToken.UpdateEventWebhookTask));
    }
}
exports.JISWorker = JISWorker;
//# sourceMappingURL=JISWorker.js.map