phet commented on code in PR #3700:
URL: https://github.com/apache/gobblin/pull/3700#discussion_r1211266080
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/restli/GobblinServiceFlowExecutionResourceHandlerWithWarmStandby.java:
##########
@@ -91,21 +89,20 @@ public UpdateResponse
delete(ComplexResourceKey<org.apache.gobblin.service.FlowS
String flowName = key.getKey().getFlowName();
Long flowExecutionId = key.getKey().getFlowExecutionId();
try {
- // If an existing resume or kill request is still pending then do not
accept this request
- if (this.dagActionStore.exists(flowGroup, flowName,
flowExecutionId.toString())) {
- DagActionStore.DagActionValue action =
this.dagActionStore.getDagAction(flowGroup, flowName,
flowExecutionId.toString()).getDagActionValue();
- this.handleException(flowGroup, flowName, flowExecutionId.toString(),
- new RuntimeException("There is already a pending " + action + "
action for this flow. Please wait to resubmit and wait for"
+ // If an existing kill request is still pending then do not accept this
request
+ if (this.dagActionStore.exists(flowGroup, flowName,
flowExecutionId.toString(), DagActionStore.DagActionValue.KILL)) {
+ this.handleException(flowGroup, flowName, flowExecutionId.toString(),
DagActionStore.DagActionValue.KILL,
+ new RuntimeException("There is already a pending KILL action for
this flow. Please wait to resubmit and wait for"
Review Comment:
feels like déjà vu... I believe I just read this code above, but now w/
`s/RESUME/KILL/g`. if so, can't we DRY it up?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]