mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Have one orchestration service per instance type (#7303)
webhook instances will not listen to either worker or event log messages on the Redis pub/sub channel
This commit is contained in:
committed by
GitHub
parent
193181a9c6
commit
afa683a06f
@@ -31,6 +31,8 @@ import { InternalHooks } from '@/InternalHooks';
|
||||
import { License } from '@/License';
|
||||
import { ExecutionRepository } from '@/databases/repositories/execution.repository';
|
||||
import { IConfig } from '@oclif/config';
|
||||
import { OrchestrationMainService } from '@/services/orchestration/main/orchestration.main.service';
|
||||
import { OrchestrationHandlerMainService } from '@/services/orchestration/main/orchestration.handler.main.service';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
|
||||
const open = require('open');
|
||||
@@ -214,6 +216,8 @@ export class Start extends BaseCommand {
|
||||
|
||||
await this.initLicense();
|
||||
this.logger.debug('License init complete');
|
||||
await this.initOrchestration();
|
||||
this.logger.debug('Orchestration init complete');
|
||||
await this.initBinaryDataService();
|
||||
this.logger.debug('Binary data service init complete');
|
||||
await this.initExternalHooks();
|
||||
@@ -228,6 +232,13 @@ export class Start extends BaseCommand {
|
||||
}
|
||||
}
|
||||
|
||||
async initOrchestration() {
|
||||
if (config.get('executions.mode') === 'queue') {
|
||||
await Container.get(OrchestrationMainService).init();
|
||||
await Container.get(OrchestrationHandlerMainService).init();
|
||||
}
|
||||
}
|
||||
|
||||
async run() {
|
||||
// eslint-disable-next-line @typescript-eslint/no-shadow
|
||||
const { flags } = this.parse(Start);
|
||||
|
||||
Reference in New Issue
Block a user