mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
⚡ Check again if workflow should be stopped after retry wait
This commit is contained in:
parent
4f4feb8baf
commit
fbaf445bf8
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue