Skip to content

Commit

Permalink
Limit number of attempts for setup errors (temporary)
Browse files Browse the repository at this point in the history
  • Loading branch information
pondzix committed Aug 7, 2024
1 parent ba886aa commit f01e1ae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,11 @@ func handleWrite(cfg *config.Config, write func() error) error {
write,
retryOnlySetupErrors,
onSetupError,
retry.Delay(time.Duration(cfg.Data.Retry.Transient.Delay)*time.Second),
retry.Attempts(0), //unlimited
retry.Delay(time.Duration(cfg.Data.Retry.Setup.Delay)*time.Second),
// for now let's limit attempts to 5 for setup errors, because we don't have health check which would allow app to be killed externally. Unlimited attempts don't make sense right now.
retry.Attempts(5),
//enable when health check + monitoring implemented
// retry.Attempts(0), //unlimited
)

if err == nil {
Expand Down

0 comments on commit f01e1ae

Please sign in to comment.