Adding more log messages to error workflows (#1895)

This commit is contained in:
Omar Ajoue 2021-06-15 12:32:13 +02:00 committed by GitHub
parent f4e6257472
commit 44c3e97621
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -387,7 +387,12 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
} }
// Leave log message before flatten as that operation increased memory usage a lot and the chance of a crash is highest here // Leave log message before flatten as that operation increased memory usage a lot and the chance of a crash is highest here
Logger.debug(`Save execution data to database for execution ID ${this.executionId}`, { executionId: this.executionId, workflowId: this.workflowData.id }); Logger.debug(`Save execution data to database for execution ID ${this.executionId}`, {
executionId: this.executionId,
workflowId: this.workflowData.id,
finished: fullExecutionData.finished,
stoppedAt: fullExecutionData.stoppedAt,
});
const executionData = ResponseHelper.flattenExecutionData(fullExecutionData); const executionData = ResponseHelper.flattenExecutionData(fullExecutionData);
@ -404,6 +409,12 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
executeErrorWorkflow(this.workflowData, fullRunData, this.mode, this.executionId, this.retryOf); executeErrorWorkflow(this.workflowData, fullRunData, this.mode, this.executionId, this.retryOf);
} }
} catch (error) { } catch (error) {
Logger.error(`Failed saving execution data to DB on execution ID ${this.executionId}`, {
executionId: this.executionId,
workflowId: this.workflowData.id,
error,
});
if (!isManualMode) { if (!isManualMode) {
executeErrorWorkflow(this.workflowData, fullRunData, this.mode, undefined, this.retryOf); executeErrorWorkflow(this.workflowData, fullRunData, this.mode, undefined, this.retryOf);
} }