Skip to content

Commit

Permalink
use workflow.Now in workflows, not time.Now (#1369)
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex authored Feb 24, 2024
1 parent 58954df commit 957e850
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion flow/workflows/cdc_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ func CDCFlowWorkflowWithConfig(
}

if state.ActiveSignal == model.PauseSignal {
startTime := time.Now()
startTime := workflow.Now(ctx)
state.CurrentFlowStatus = protos.FlowStatus_STATUS_PAUSED

for state.ActiveSignal == model.PauseSignal {
Expand Down
2 changes: 1 addition & 1 deletion flow/workflows/qrep_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ func QRepFlowWorkflow(
signalChan := model.FlowSignal.GetSignalChannel(ctx)
q.receiveAndHandleSignalAsync(signalChan)
if q.activeSignal == model.PauseSignal {
startTime := time.Now()
startTime := workflow.Now(ctx)
state.CurrentFlowStatus = protos.FlowStatus_STATUS_PAUSED

for q.activeSignal == model.PauseSignal {
Expand Down
2 changes: 1 addition & 1 deletion flow/workflows/xmin_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func XminFlowWorkflow(
signalChan := model.FlowSignal.GetSignalChannel(ctx)
q.receiveAndHandleSignalAsync(signalChan)
if q.activeSignal == model.PauseSignal {
startTime := time.Now()
startTime := workflow.Now(ctx)
state.CurrentFlowStatus = protos.FlowStatus_STATUS_PAUSED

for q.activeSignal == model.PauseSignal {
Expand Down

0 comments on commit 957e850

Please sign in to comment.