Skip to content

Commit

Permalink
Move reading PEERDB_DISABLE_ONE_SYNC into side effect (#1490)
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex authored Mar 15, 2024
1 parent 244c095 commit 78a8cdb
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))

enableOneSync := GetSideEffect(ctx, func(_ workflow.Context) bool {
return !peerdbenv.PeerDBDisableOneSync()
})
var fMaintain workflow.Future
var sessionID string
if !peerdbenv.PeerDBDisableOneSync() {
if enableOneSync {
sessionOptions := &workflow.SessionOptions{
CreationTimeout: 5 * time.Minute,
ExecutionTimeout: 144 * time.Hour,
Expand Down

0 comments on commit 78a8cdb

Please sign in to comment.