Skip to content

Commit

Permalink
Move reading PEERDB_DISABLE_ONE_SYNC into side effect
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Mar 15, 2024
1 parent 244c095 commit 908c63c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flow/workflows/sync_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 908c63c

Please sign in to comment.