refactor(core): Consolidate execution lifecycle hooks even more + additional tests (#12898)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-02-04 10:17:44 +01:00
committed by GitHub
parent 9bcbc2c2cc
commit 65ec6ae0c8
13 changed files with 364 additions and 310 deletions

View File

@@ -38,7 +38,6 @@ import { WorkflowRepository } from '@/databases/repositories/workflow.repository
import { EventService } from '@/events/event.service';
import type { AiEventMap, AiEventPayload } from '@/events/maps/ai.event-map';
import { getWorkflowHooksIntegrated } from '@/execution-lifecycle/execution-lifecycle-hooks';
import { ExternalHooks } from '@/external-hooks';
import type { UpdateExecutionPayload } from '@/interfaces';
import { NodeTypes } from '@/node-types';
import { Push } from '@/push';
@@ -303,9 +302,6 @@ async function startExecution(
);
}
const externalHooks = Container.get(ExternalHooks);
await externalHooks.run('workflow.postExecute', [data, workflowData, executionId]);
// 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