Skip to content

Commit

Permalink
Adds flag for flow job entry removal (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj authored Nov 2, 2023
1 parent 0aec792 commit b2c9686
Show file tree
Hide file tree
Showing 10 changed files with 600 additions and 555 deletions.
14 changes: 8 additions & 6 deletions flow/cmd/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,14 @@ func (h *FlowRequestHandler) ShutdownFlow(
}
}

delErr := h.removeFlowEntryInCatalog(req.FlowJobName)
if delErr != nil {
return &protos.ShutdownResponse{
Ok: false,
ErrorMessage: err.Error(),
}, err
if req.RemoveFlowEntry {
delErr := h.removeFlowEntryInCatalog(req.FlowJobName)
if delErr != nil {
return &protos.ShutdownResponse{
Ok: false,
ErrorMessage: err.Error(),
}, err
}
}

return &protos.ShutdownResponse{
Expand Down
535 changes: 273 additions & 262 deletions flow/generated/protos/route.pb.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions nexus/flow-rs/src/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ impl FlowGrpcClient {
workflow_id: workflow_details.workflow_id,
source_peer: Some(workflow_details.source_peer),
destination_peer: Some(workflow_details.destination_peer),
remove_flow_entry:false
};
let response = self.client.shutdown_flow(shutdown_flow_req).await?;
let shutdown_response = response.into_inner();
Expand Down
Loading

0 comments on commit b2c9686

Please sign in to comment.