mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Lock webhook process out of multi-main setup (no-changelog) (#8549)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Container } from 'typedi';
|
||||
import { Flags, type Config } from '@oclif/core';
|
||||
import { sleep } from 'n8n-workflow';
|
||||
import { ApplicationError, sleep } from 'n8n-workflow';
|
||||
|
||||
import config from '@/config';
|
||||
import { ActiveExecutions } from '@/ActiveExecutions';
|
||||
@@ -102,6 +102,12 @@ export class Webhook extends BaseCommand {
|
||||
}
|
||||
|
||||
async run() {
|
||||
if (config.getEnv('multiMainSetup.enabled')) {
|
||||
throw new ApplicationError(
|
||||
'Webhook process cannot be started when multi-main setup is enabled.',
|
||||
);
|
||||
}
|
||||
|
||||
await Container.get(Queue).init();
|
||||
await this.server.start();
|
||||
this.logger.debug(`Webhook listener ID: ${this.server.uniqueInstanceId}`);
|
||||
|
||||
Reference in New Issue
Block a user