Check again if workflow should be stopped after retry wait

This commit is contained in:
Jan Oberhauser 2019-07-19 09:47:41 +02:00
parent 4f4feb8baf
commit fbaf445bf8

View file

@ -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);