refactor(core): Rename EventsService to WorkflowStatisticsService (no-changelog) (#10107)

This commit is contained in:
Iván Ovejero
2024-07-19 12:12:44 +02:00
committed by GitHub
parent 1c666e6e7c
commit 222a0862bd
5 changed files with 41 additions and 26 deletions

View File

@@ -56,7 +56,7 @@ import * as WorkflowHelpers from '@/WorkflowHelpers';
import { WorkflowRunner } from '@/WorkflowRunner';
import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData';
import { ActiveExecutions } from '@/ActiveExecutions';
import { EventsService } from '@/services/events.service';
import { WorkflowStatisticsService } from '@/services/workflow-statistics.service';
import { OwnershipService } from './services/ownership.service';
import { parseBody } from './middlewares';
import { Logger } from './Logger';
@@ -360,7 +360,11 @@ export async function executeWebhook(
NodeExecuteFunctions,
executionMode,
);
Container.get(EventsService).emit('nodeFetchedData', workflow.id, workflowStartNode);
Container.get(WorkflowStatisticsService).emit(
'nodeFetchedData',
workflow.id,
workflowStartNode,
);
} catch (err) {
// Send error response to webhook caller
const errorMessage = 'Workflow Webhook Error: Workflow could not be started!';