Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
add removeWorkflowWithExpiry back to ExecutionDAOFacade (#3150)
Browse files Browse the repository at this point in the history
  • Loading branch information
jxu-nflx authored Aug 5, 2022
1 parent ab14727 commit d7dd2e9
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,20 @@ private void removeWorkflowIndex(WorkflowModel workflow, boolean archiveWorkflow
}
}

public void removeWorkflowWithExpiry(
String workflowId, boolean archiveWorkflow, int ttlSeconds) {
try {
WorkflowModel workflow = getWorkflowModelFromDataStore(workflowId, true);

removeWorkflowIndex(workflow, archiveWorkflow);
// remove workflow from DAO with TTL
executionDAO.removeWorkflowWithExpiry(workflowId, ttlSeconds);
} catch (Exception e) {
Monitors.recordDaoError("executionDao", "removeWorkflow");
throw new TransientException("Error removing workflow: " + workflowId, e);
}
}

/**
* Reset the workflow state by removing from the {@link ExecutionDAO} and removing this workflow
* from the {@link IndexDAO}.
Expand Down

0 comments on commit d7dd2e9

Please sign in to comment.