refactor(core): Limit soft-deletions to pruning only (#7469)

Based on customer feedback, we should limit soft deletions to pruning
only, to prevent executions from piling up in very high volume cases.
This commit is contained in:
Iván Ovejero
2023-10-20 15:02:47 +02:00
committed by GitHub
parent 3c0a166f7f
commit 0b42d1aa71
5 changed files with 54 additions and 23 deletions

View File

@@ -516,7 +516,10 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
}
if (isManualMode && !saveManualExecutions && !fullRunData.waitTill) {
await Container.get(ExecutionRepository).softDelete(this.executionId);
await Container.get(ExecutionRepository).hardDelete({
workflowId: this.workflowData.id as string,
executionId: this.executionId,
});
return;
}
@@ -547,7 +550,10 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
this.executionId,
this.retryOf,
);
await Container.get(ExecutionRepository).softDelete(this.executionId);
await Container.get(ExecutionRepository).hardDelete({
workflowId: this.workflowData.id as string,
executionId: this.executionId,
});
return;
}