Skip to content

Commit

Permalink
fix(core): Allow grace period for binary data deletion after manual e…
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov authored Dec 1, 2023
1 parent ade3acf commit 61d8aeb
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/cli/src/WorkflowExecuteAdditionalData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,16 @@ function hookFunctionsSave(parentProcessMode?: string): IWorkflowExecuteHooks {
const saveSettings = toSaveSettings(this.workflowData.settings);

if (isManualMode && !saveSettings.manual && !fullRunData.waitTill) {
await Container.get(ExecutionRepository).hardDelete({
workflowId: this.workflowData.id as string,
executionId: this.executionId,
});
/**
* When manual executions are not being saved, we only soft-delete
* the execution so that the user can access its binary data
* while building their workflow.
*
* The manual execution and its binary data will be hard-deleted
* on the next pruning cycle after the grace period set by
* `EXECUTIONS_DATA_HARD_DELETE_BUFFER`.
*/
await Container.get(ExecutionRepository).softDelete(this.executionId);

return;
}
Expand Down

0 comments on commit 61d8aeb

Please sign in to comment.