mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(core): Fix issue where sub workflows would display as running forever after failure to start (#5905)
* fixed recovery / status for early return in main mode * mark non-data returning executions in own mode as failed * improve error handling
This commit is contained in:
committed by
GitHub
parent
2881ee9ecc
commit
3e382ef85e
@@ -638,7 +638,7 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
|
||||
};
|
||||
|
||||
if (this.retryOf !== undefined) {
|
||||
fullExecutionData.retryOf = this.retryOf.toString();
|
||||
fullExecutionData.retryOf = this.retryOf?.toString();
|
||||
}
|
||||
|
||||
const workflowId = this.workflowData.id;
|
||||
@@ -1054,7 +1054,7 @@ async function executeWorkflow(
|
||||
mode: 'integrated',
|
||||
startedAt: new Date(),
|
||||
stoppedAt: new Date(),
|
||||
status: 'error',
|
||||
status: 'failed',
|
||||
};
|
||||
// When failing, we might not have finished the execution
|
||||
// Therefore, database might not contain finished errors.
|
||||
@@ -1073,6 +1073,9 @@ async function executeWorkflow(
|
||||
fullExecutionData.workflowId = workflowData.id;
|
||||
}
|
||||
|
||||
// remove execution from active executions
|
||||
Container.get(ActiveExecutions).remove(executionId, fullRunData);
|
||||
|
||||
const executionData = ResponseHelper.flattenExecutionData(fullExecutionData);
|
||||
|
||||
await Db.collections.Execution.update(executionId, executionData as IExecutionFlattedDb);
|
||||
|
||||
Reference in New Issue
Block a user