mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Move execution engine code out of n8n-workflow (no-changelog) (#12147)
This commit is contained in:
committed by
GitHub
parent
73f0c4cca9
commit
5a055ed526
@@ -1,5 +1,4 @@
|
||||
import type express from 'express';
|
||||
import * as NodeExecuteFunctions from 'n8n-core';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { WebhookPathTakenError, Workflow } from 'n8n-workflow';
|
||||
import type {
|
||||
@@ -25,6 +24,7 @@ import * as WebhookHelpers from '@/webhooks/webhook-helpers';
|
||||
import * as WorkflowExecuteAdditionalData from '@/workflow-execute-additional-data';
|
||||
import type { WorkflowRequest } from '@/workflows/workflow.request';
|
||||
|
||||
import { WebhookService } from './webhook.service';
|
||||
import type {
|
||||
IWebhookResponseCallbackData,
|
||||
IWebhookManager,
|
||||
@@ -44,6 +44,7 @@ export class TestWebhooks implements IWebhookManager {
|
||||
private readonly registrations: TestWebhookRegistrationsService,
|
||||
private readonly instanceSettings: InstanceSettings,
|
||||
private readonly publisher: Publisher,
|
||||
private readonly webhookService: WebhookService,
|
||||
) {}
|
||||
|
||||
private timeouts: { [webhookKey: string]: NodeJS.Timeout } = {};
|
||||
@@ -314,7 +315,7 @@ export class TestWebhooks implements IWebhookManager {
|
||||
*/
|
||||
await this.registrations.register(registration);
|
||||
|
||||
await workflow.createWebhookIfNotExists(webhook, NodeExecuteFunctions, 'manual', 'manual');
|
||||
await this.webhookService.createWebhookIfNotExists(workflow, webhook, 'manual', 'manual');
|
||||
|
||||
cacheableWebhook.staticData = workflow.staticData;
|
||||
|
||||
@@ -431,7 +432,7 @@ export class TestWebhooks implements IWebhookManager {
|
||||
|
||||
if (staticData) workflow.staticData = staticData;
|
||||
|
||||
await workflow.deleteWebhook(webhook, NodeExecuteFunctions, 'internal', 'update');
|
||||
await this.webhookService.deleteWebhook(workflow, webhook, 'internal', 'update');
|
||||
}
|
||||
|
||||
await this.registrations.deregisterAll();
|
||||
|
||||
Reference in New Issue
Block a user