"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataRetentionWorker = void 0;
const Di_1 = require("../ioc/Di");
const RetentionContainerToken_1 = require("../ioc/RetentionContainerToken");
const WorkerName_1 = require("./constants/WorkerName");
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
const DeleteDataTask_1 = require("./tasks/DeleteDataTask");
class DataRetentionWorker extends workers_1.AbstractWorker {
    constructor() {
        super();
        this.name = WorkerName_1.WORKER_NAME;
        this.registerTask = (task) => {
            super.registerTask(task);
            task.queuePrefix = this.getQueuePrefix();
        };
        // Register tasks
        this.registerTask(Di_1.RetentionContainer.resolve(RetentionContainerToken_1.RetentionContainerToken.TableStorageRetentionTask));
        this.registerTask(new DeleteDataTask_1.DeleteDataTask(this.getQueuePrefix()));
    }
}
exports.DataRetentionWorker = DataRetentionWorker;
//# sourceMappingURL=DataRetentionWorker.js.map