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 17, 2024
1 parent 3080cae commit e424117
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 @@ -442,10 +442,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 @@ -462,13 +458,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 e424117

Please sign in to comment.