From 957e850f84ab54f50c8b3ac2631dad0844ae8aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Sat, 24 Feb 2024 02:38:46 +0000 Subject: [PATCH] use workflow.Now in workflows, not time.Now (#1369) https://pkg.go.dev/go.temporal.io/sdk/workflow#Now --- flow/workflows/cdc_flow.go | 2 +- flow/workflows/qrep_flow.go | 2 +- flow/workflows/xmin_flow.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/flow/workflows/cdc_flow.go b/flow/workflows/cdc_flow.go index f6297c909b..e56dd83410 100644 --- a/flow/workflows/cdc_flow.go +++ b/flow/workflows/cdc_flow.go @@ -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 { diff --git a/flow/workflows/qrep_flow.go b/flow/workflows/qrep_flow.go index 2266784e40..62f83adce0 100644 --- a/flow/workflows/qrep_flow.go +++ b/flow/workflows/qrep_flow.go @@ -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 { diff --git a/flow/workflows/xmin_flow.go b/flow/workflows/xmin_flow.go index 574550ee2e..807a09ac92 100644 --- a/flow/workflows/xmin_flow.go +++ b/flow/workflows/xmin_flow.go @@ -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 {