mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Move multi-main state to InstanceSettings (#12144)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type express from 'express';
|
||||
import * as NodeExecuteFunctions from 'n8n-core';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { WebhookPathTakenError, Workflow } from 'n8n-workflow';
|
||||
import type {
|
||||
IWebhookData,
|
||||
@@ -17,7 +18,6 @@ import type { IWorkflowDb } from '@/interfaces';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import { Push } from '@/push';
|
||||
import { Publisher } from '@/scaling/pubsub/publisher.service';
|
||||
import { OrchestrationService } from '@/services/orchestration.service';
|
||||
import { removeTrailingSlash } from '@/utils';
|
||||
import type { TestWebhookRegistration } from '@/webhooks/test-webhook-registrations.service';
|
||||
import { TestWebhookRegistrationsService } from '@/webhooks/test-webhook-registrations.service';
|
||||
@@ -42,7 +42,7 @@ export class TestWebhooks implements IWebhookManager {
|
||||
private readonly push: Push,
|
||||
private readonly nodeTypes: NodeTypes,
|
||||
private readonly registrations: TestWebhookRegistrationsService,
|
||||
private readonly orchestrationService: OrchestrationService,
|
||||
private readonly instanceSettings: InstanceSettings,
|
||||
private readonly publisher: Publisher,
|
||||
) {}
|
||||
|
||||
@@ -155,7 +155,7 @@ export class TestWebhooks implements IWebhookManager {
|
||||
* the handler process commands the creator process to clear its test webhooks.
|
||||
*/
|
||||
if (
|
||||
this.orchestrationService.isMultiMainSetupEnabled &&
|
||||
this.instanceSettings.isMultiMain &&
|
||||
pushRef &&
|
||||
!this.push.getBackend().hasPushRef(pushRef)
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user