mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Simplify webhook pubsub message handler (#11048)
This commit is contained in:
@@ -4,7 +4,8 @@ import { Container } from 'typedi';
|
||||
|
||||
import { ActiveExecutions } from '@/active-executions';
|
||||
import config from '@/config';
|
||||
import { OrchestrationHandlerWebhookService } from '@/services/orchestration/webhook/orchestration.handler.webhook.service';
|
||||
import { PubSubHandler } from '@/scaling/pubsub/pubsub-handler';
|
||||
import { Subscriber } from '@/scaling/pubsub/subscriber.service';
|
||||
import { OrchestrationWebhookService } from '@/services/orchestration/webhook/orchestration.webhook.service';
|
||||
import { WebhookServer } from '@/webhooks/webhook-server';
|
||||
|
||||
@@ -110,6 +111,11 @@ export class Webhook extends BaseCommand {
|
||||
|
||||
async initOrchestration() {
|
||||
await Container.get(OrchestrationWebhookService).init();
|
||||
await Container.get(OrchestrationHandlerWebhookService).init();
|
||||
|
||||
const subscriber = Container.get(Subscriber);
|
||||
await subscriber.subscribe('n8n.commands');
|
||||
subscriber.setCommandMessageHandler();
|
||||
|
||||
Container.get(PubSubHandler).init();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user