Skip to content

Commit

Permalink
removed refs to gone var
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal committed Jan 15, 2024
1 parent 0e803df commit dda4975
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
11 changes: 0 additions & 11 deletions flow/cmd/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,6 @@ func (h *FlowRequestHandler) FlowStateChange(
if err != nil {
return nil, err
}
isCDCFlow, err := h.isCDCFlow(ctx, req.FlowJobName)
if err != nil {
return nil, err
}

if req.RequestedFlowState == protos.FlowStatus_STATUS_PAUSED &&
currState == protos.FlowStatus_STATUS_RUNNING {
Expand All @@ -464,13 +460,6 @@ func (h *FlowRequestHandler) FlowStateChange(
)
} else if req.RequestedFlowState == protos.FlowStatus_STATUS_RUNNING &&
currState == protos.FlowStatus_STATUS_PAUSED {
if isCDCFlow && req.FlowConfigUpdate.GetCdcFlowConfigUpdate() != nil {
err = h.attemptCDCFlowConfigUpdate(ctx, workflowID,
req.FlowConfigUpdate.GetCdcFlowConfigUpdate())
if err != nil {
return nil, err
}
}
err = h.temporalClient.SignalWorkflow(
ctx,
workflowID,
Expand Down
11 changes: 0 additions & 11 deletions flow/cmd/mirror_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,3 @@ func (h *FlowRequestHandler) updateWorkflowStatus(
}
return nil
}

func (h *FlowRequestHandler) attemptCDCFlowConfigUpdate(ctx context.Context,
workflowID string, cdcFlowConfigUpdate *protos.CDCFlowConfigUpdate,
) error {
_, err := h.temporalClient.UpdateWorkflow(ctx, workflowID, "",
shared.CDCFlowConfigUpdate, cdcFlowConfigUpdate)
if err != nil {
return fmt.Errorf("failed to update config in CDC workflow with ID %s: %w", workflowID, err)
}
return nil
}

0 comments on commit dda4975

Please sign in to comment.