Skip to content

Commit

Permalink
Optimise state setting for initial load only (#2275)
Browse files Browse the repository at this point in the history
Set status to running after the initial load only check
  • Loading branch information
Amogh-Bharadwaj authored Nov 20, 2024
1 parent b8e55ea commit b5e2063
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flow/workflows/cdc_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,15 @@ func CDCFlowWorkflow(
}
}

state.CurrentFlowStatus = protos.FlowStatus_STATUS_RUNNING
logger.Info("executed setup flow and snapshot flow")

// if initial_copy_only is opted for, we end the flow here.
if cfg.InitialSnapshotOnly {
logger.Info("initial snapshot only, ending flow")
state.CurrentFlowStatus = protos.FlowStatus_STATUS_COMPLETED
return state, nil
}

state.CurrentFlowStatus = protos.FlowStatus_STATUS_RUNNING
}

syncFlowID := GetChildWorkflowID("sync-flow", cfg.FlowJobName, originalRunID)
Expand Down

0 comments on commit b5e2063

Please sign in to comment.