mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
refactor(core): Refactor execution post-execute promises (no-changelog) (#10809)
Co-authored-by: Danny Martini <danny@n8n.io>
This commit is contained in:
committed by
GitHub
parent
521bbfeee5
commit
67fb6d6fdd
@@ -879,8 +879,7 @@ async function executeWorkflow(
|
||||
fullExecutionData.workflowId = workflowData.id;
|
||||
}
|
||||
|
||||
// remove execution from active executions
|
||||
activeExecutions.remove(executionId, fullRunData);
|
||||
activeExecutions.finalizeExecution(executionId, fullRunData);
|
||||
|
||||
await executionRepository.updateExistingExecution(executionId, fullExecutionData);
|
||||
throw objectToError(
|
||||
@@ -906,11 +905,11 @@ async function executeWorkflow(
|
||||
if (data.finished === true || data.status === 'waiting') {
|
||||
// Workflow did finish successfully
|
||||
|
||||
activeExecutions.remove(executionId, data);
|
||||
activeExecutions.finalizeExecution(executionId, data);
|
||||
const returnData = WorkflowHelpers.getDataLastExecutedNodeData(data);
|
||||
return returnData!.data!.main;
|
||||
}
|
||||
activeExecutions.remove(executionId, data);
|
||||
activeExecutions.finalizeExecution(executionId, data);
|
||||
|
||||
// Workflow did fail
|
||||
const { error } = data.data.resultData;
|
||||
|
||||
Reference in New Issue
Block a user