mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 12:19:09 +00:00
refactor(core): Simplify OrchestrationService (no-changelog) (#8364)
This commit is contained in:
@@ -25,7 +25,7 @@ import * as NodeExecuteFunctions from 'n8n-core';
|
||||
import { removeTrailingSlash } from './utils';
|
||||
import type { TestWebhookRegistration } from '@/services/test-webhook-registrations.service';
|
||||
import { TestWebhookRegistrationsService } from '@/services/test-webhook-registrations.service';
|
||||
import { MultiMainSetup } from './services/orchestration/main/MultiMainSetup.ee';
|
||||
import { OrchestrationService } from '@/services/orchestration.service';
|
||||
import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData';
|
||||
|
||||
@Service()
|
||||
@@ -34,7 +34,7 @@ export class TestWebhooks implements IWebhookManager {
|
||||
private readonly push: Push,
|
||||
private readonly nodeTypes: NodeTypes,
|
||||
private readonly registrations: TestWebhookRegistrationsService,
|
||||
private readonly multiMainSetup: MultiMainSetup,
|
||||
private readonly orchestrationService: OrchestrationService,
|
||||
) {}
|
||||
|
||||
private timeouts: { [webhookKey: string]: NodeJS.Timeout } = {};
|
||||
@@ -144,12 +144,12 @@ export class TestWebhooks implements IWebhookManager {
|
||||
* the handler process commands the creator process to clear its test webhooks.
|
||||
*/
|
||||
if (
|
||||
this.multiMainSetup.isEnabled &&
|
||||
this.orchestrationService.isMultiMainSetupEnabled &&
|
||||
sessionId &&
|
||||
!this.push.getBackend().hasSessionId(sessionId)
|
||||
) {
|
||||
const payload = { webhookKey: key, workflowEntity, sessionId };
|
||||
void this.multiMainSetup.publish('clear-test-webhooks', payload);
|
||||
void this.orchestrationService.publish('clear-test-webhooks', payload);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user