Skip to content

Commit

Permalink
no retries, handle retry timeout ourselves
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Dec 24, 2024
1 parent 81bd73c commit 85dbc04
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions flow/workflows/cdc_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ func processCDCFlowConfigUpdate(
}
if flowConfigUpdate.NumberOfSyncs > 0 {
state.SyncFlowOptions.NumberOfSyncs = flowConfigUpdate.NumberOfSyncs
} else if flowConfigUpdate.NumberOfSyncs < 0 {
state.SyncFlowOptions.NumberOfSyncs = 0
}
if flowConfigUpdate.UpdatedEnv != nil {
maps.Copy(cfg.Env, flowConfigUpdate.UpdatedEnv)
Expand Down Expand Up @@ -478,9 +480,7 @@ func CDCFlowWorkflow(
StartToCloseTimeout: 365 * 24 * time.Hour,
HeartbeatTimeout: time.Minute,
WaitForCancellation: true,
RetryPolicy: &temporal.RetryPolicy{
InitialInterval: 30 * time.Second,
},
RetryPolicy: &temporal.RetryPolicy{MaximumAttempts: 1},
})
syncFlowFuture := workflow.ExecuteActivity(syncCtx, flowable.SyncFlow, cfg, state.SyncFlowOptions)

Expand All @@ -500,6 +500,7 @@ func CDCFlowWorkflow(
} else {
logger.Error("error in sync flow", slog.Any("error", err))
}
_ = workflow.Sleep(ctx, 30*time.Second)
} else {
logger.Info("sync finished")
}
Expand Down

0 comments on commit 85dbc04

Please sign in to comment.