mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
fix: Prevent executions from displaying as running forever (#5563)
* fix: Prevent executions from displaying as running forever * fix: Correct migration query
This commit is contained in:
@@ -472,7 +472,6 @@ export function hookFunctionsPreExecute(parentProcessMode?: string): IWorkflowEx
|
||||
fullExecutionData.status = 'running';
|
||||
|
||||
const flattenedExecutionData = ResponseHelper.flattenExecutionData(fullExecutionData);
|
||||
|
||||
await Db.collections.Execution.update(
|
||||
this.executionId,
|
||||
flattenedExecutionData as IExecutionFlattedDb,
|
||||
@@ -578,7 +577,11 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
|
||||
saveDataSuccessExecution;
|
||||
}
|
||||
|
||||
const workflowDidSucceed = !fullRunData.data.resultData.error;
|
||||
const workflowHasCrashed = fullRunData.status === 'crashed';
|
||||
const workflowDidSucceed = !fullRunData.data.resultData.error && !workflowHasCrashed;
|
||||
let workflowStatusFinal: ExecutionStatus = workflowDidSucceed ? 'success' : 'failed';
|
||||
if (workflowHasCrashed) workflowStatusFinal = 'crashed';
|
||||
|
||||
if (
|
||||
(workflowDidSucceed && saveDataSuccessExecution === 'none') ||
|
||||
(!workflowDidSucceed && saveDataErrorExecution === 'none')
|
||||
@@ -626,7 +629,7 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
|
||||
stoppedAt: fullRunData.stoppedAt,
|
||||
workflowData: pristineWorkflowData,
|
||||
waitTill: fullRunData.waitTill,
|
||||
status: fullRunData.status,
|
||||
status: workflowStatusFinal,
|
||||
};
|
||||
|
||||
if (this.retryOf !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user