mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
refactor(core): Move all execution lifecycle telemetry events to lifecycle hooks (no-changelog) (#12816)
This commit is contained in:
committed by
GitHub
parent
49b8693d7c
commit
69a97bd32d
@@ -187,7 +187,6 @@ async function startExecution(
|
||||
|
||||
const nodeTypes = Container.get(NodeTypes);
|
||||
const activeExecutions = Container.get(ActiveExecutions);
|
||||
const eventService = Container.get(EventService);
|
||||
const executionRepository = Container.get(ExecutionRepository);
|
||||
|
||||
const workflowName = workflowData ? workflowData.name : undefined;
|
||||
@@ -209,8 +208,6 @@ async function startExecution(
|
||||
*/
|
||||
await executionRepository.setRunning(executionId);
|
||||
|
||||
Container.get(EventService).emit('workflow-pre-execute', { executionId, data: runData });
|
||||
|
||||
let data;
|
||||
try {
|
||||
await Container.get(PermissionChecker).check(workflowData.id, workflowData.nodes);
|
||||
@@ -228,6 +225,7 @@ async function startExecution(
|
||||
runData.executionMode,
|
||||
executionId,
|
||||
workflowData,
|
||||
additionalData.userId,
|
||||
);
|
||||
additionalDataIntegrated.executionId = executionId;
|
||||
additionalDataIntegrated.parentCallbackManager = options.parentCallbackManager;
|
||||
@@ -310,13 +308,6 @@ async function startExecution(
|
||||
|
||||
await externalHooks.run('workflow.postExecute', [data, workflowData, executionId]);
|
||||
|
||||
eventService.emit('workflow-post-execute', {
|
||||
workflow: workflowData,
|
||||
executionId,
|
||||
userId: additionalData.userId,
|
||||
runData: data,
|
||||
});
|
||||
|
||||
// subworkflow either finished, or is in status waiting due to a wait node, both cases are considered successes here
|
||||
if (data.finished === true || data.status === 'waiting') {
|
||||
// Workflow did finish successfully
|
||||
|
||||
Reference in New Issue
Block a user