fix(core): Tighten checks for multi-main setup usage (#7788)
https://n8nio.slack.com/archives/C05HRPLSGTT/p1700731476321999?thread_ts=1700729359.746899&cid=C05HRPLSGTT
This commit is contained in:
@@ -14,6 +14,7 @@ export class MultiMainSetup extends SingleMainSetup {
|
||||
return (
|
||||
config.getEnv('executions.mode') === 'queue' &&
|
||||
config.getEnv('multiMainSetup.enabled') &&
|
||||
config.getEnv('generic.instanceType') === 'main' &&
|
||||
this.isLicensed
|
||||
);
|
||||
}
|
||||
@@ -37,7 +38,7 @@ export class MultiMainSetup extends SingleMainSetup {
|
||||
private leaderCheckInterval: NodeJS.Timer | undefined;
|
||||
|
||||
async init() {
|
||||
if (this.isInitialized) return;
|
||||
if (!this.isEnabled || this.isInitialized) return;
|
||||
|
||||
await this.initPublisher();
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ export class PruningService {
|
||||
|
||||
if (
|
||||
config.getEnv('multiMainSetup.enabled') &&
|
||||
config.getEnv('generic.instanceType') === 'main' &&
|
||||
config.getEnv('multiMainSetup.instanceType') === 'follower'
|
||||
) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user