🐛 Fix issue that ErrorWorkflows did not get executed in queue mode

This commit is contained in:
Jan Oberhauser 2021-06-03 18:41:12 -05:00
parent 40e41f7506
commit 781f3896a1

View file

@ -438,14 +438,8 @@ function hookFunctionsSaveWorker(): IWorkflowExecuteHooks {
} }
} }
// Check config to know if execution should be saved or not
let saveDataErrorExecution = config.get('executions.saveDataOnError') as string;
if (this.workflowData.settings !== undefined) {
saveDataErrorExecution = (this.workflowData.settings.saveDataErrorExecution as string) || saveDataErrorExecution;
}
const workflowDidSucceed = !fullRunData.data.resultData.error; const workflowDidSucceed = !fullRunData.data.resultData.error;
if (workflowDidSucceed === false && saveDataErrorExecution === 'none') { if (workflowDidSucceed === false) {
executeErrorWorkflow(this.workflowData, fullRunData, this.mode, undefined, this.retryOf); executeErrorWorkflow(this.workflowData, fullRunData, this.mode, undefined, this.retryOf);
} }
@ -473,7 +467,6 @@ function hookFunctionsSaveWorker(): IWorkflowExecuteHooks {
if (fullRunData.finished === true && this.retryOf !== undefined) { if (fullRunData.finished === true && this.retryOf !== undefined) {
// If the retry was successful save the reference it on the original execution // If the retry was successful save the reference it on the original execution
// await Db.collections.Execution!.save(executionData as IExecutionFlattedDb);
await Db.collections.Execution!.update(this.retryOf, { retrySuccessId: this.executionId }); await Db.collections.Execution!.update(this.retryOf, { retrySuccessId: this.executionId });
} }
} catch (error) { } catch (error) {