diff --git a/flow/workflows/sync_flow.go b/flow/workflows/sync_flow.go index 3295957049..6b7c202978 100644 --- a/flow/workflows/sync_flow.go +++ b/flow/workflows/sync_flow.go @@ -28,9 +28,12 @@ func SyncFlowWorkflow( parent := workflow.GetInfo(ctx).ParentWorkflowExecution logger := log.With(workflow.GetLogger(ctx), slog.String(string(shared.FlowNameKey), config.FlowJobName)) + disableOneSync := GetSideEffect(ctx, func(_ workflow.Context) bool { + return peerdbenv.PeerDBDisableOneSync() + }) var fMaintain workflow.Future var sessionID string - if !peerdbenv.PeerDBDisableOneSync() { + if !disableOneSync { sessionOptions := &workflow.SessionOptions{ CreationTimeout: 5 * time.Minute, ExecutionTimeout: 144 * time.Hour,