mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
🐛 Fix issue that ErrorWorkflows did not get executed in queue mode
This commit is contained in:
parent
40e41f7506
commit
781f3896a1
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue