n8n
Version:
n8n Workflow Automation Tool
29 lines • 1.94 kB
JavaScript
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrchestrationHandlerWebhookService = void 0;
const typedi_1 = require("typedi");
const RedisConstants_1 = require("../../redis/RedisConstants");
const orchestration_handler_base_service_1 = require("../../orchestration.handler.base.service");
const handleCommandMessageWebhook_1 = require("./handleCommandMessageWebhook");
let OrchestrationHandlerWebhookService = class OrchestrationHandlerWebhookService extends orchestration_handler_base_service_1.OrchestrationHandlerService {
async initSubscriber() {
this.redisSubscriber = await this.redisService.getPubSubSubscriber();
await this.redisSubscriber.subscribeToCommandChannel();
this.redisSubscriber.addMessageHandler('OrchestrationMessageReceiver', async (channel, messageString) => {
if (channel === RedisConstants_1.COMMAND_REDIS_CHANNEL) {
await (0, handleCommandMessageWebhook_1.handleCommandMessageWebhook)(messageString);
}
});
}
};
exports.OrchestrationHandlerWebhookService = OrchestrationHandlerWebhookService;
exports.OrchestrationHandlerWebhookService = OrchestrationHandlerWebhookService = __decorate([
(0, typedi_1.Service)()
], OrchestrationHandlerWebhookService);
//# sourceMappingURL=orchestration.handler.webhook.service.js.map
;