diff --git a/packages/core/src/WorkflowExecute.ts b/packages/core/src/WorkflowExecute.ts index b8bd8512f..8bcad84cd 100644 --- a/packages/core/src/WorkflowExecute.ts +++ b/packages/core/src/WorkflowExecute.ts @@ -374,6 +374,7 @@ export class WorkflowExecute { for (let tryIndex = 0; tryIndex < maxTries; tryIndex++) { try { + if (tryIndex !== 0) { // Reset executionError from previous error try executionError = undefined; @@ -388,6 +389,13 @@ export class WorkflowExecute { } } + // Check again if the execution should be stopped else it + // could take forever to stop when each try takes a long time + if (this.activeExecutions.shouldBeStopped(this.executionId!) === true) { + // The execution should be stopped + break; + } + runExecutionData.resultData.lastNodeExecuted = executionData.node.name; nodeSuccessData = await workflow.runNode(executionData.node, JSON.parse(JSON.stringify(executionData.data)), runExecutionData, runIndex, this.additionalData, NodeExecuteFunctions, this.mode);