Reduce risk of errors causing never stopping workflows

This commit is contained in:
Jan Oberhauser 2021-07-14 16:34:54 +02:00
parent 8cceec1209
commit e40f0e00a8

View file

@ -212,12 +212,6 @@ export class WorkflowRunner {
workflowExecution = workflowExecute.runPartialWorkflow(workflow, data.runData, data.startNodes, data.destinationNode);
}
} catch (error) {
await this.processError(error, new Date(), data.executionMode, executionId, additionalData.hooks);
throw error;
}
this.activeExecutions.attachWorkflowExecution(executionId, workflowExecution);
if (workflowTimeout > 0) {
@ -237,6 +231,12 @@ export class WorkflowRunner {
this.processError(error, new Date(), data.executionMode, executionId, additionalData.hooks);
});
} catch (error) {
await this.processError(error, new Date(), data.executionMode, executionId, additionalData.hooks);
throw error;
}
return executionId;
}