mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
refactor(core): Make external hooks type-safe, and add tests (#12893)
This commit is contained in:
committed by
GitHub
parent
3d27a14987
commit
05b5f95331
@@ -182,9 +182,6 @@ async function startExecution(
|
||||
runData: IWorkflowExecutionDataProcess,
|
||||
workflowData: IWorkflowBase,
|
||||
): Promise<ExecuteWorkflowData> {
|
||||
const externalHooks = Container.get(ExternalHooks);
|
||||
await externalHooks.init();
|
||||
|
||||
const nodeTypes = Container.get(NodeTypes);
|
||||
const activeExecutions = Container.get(ActiveExecutions);
|
||||
const executionRepository = Container.get(ExecutionRepository);
|
||||
@@ -306,6 +303,7 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user