Skip to content

Commit

Permalink
Used a fixed retry delay type rather than backoff (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Apr 5, 2024
1 parent 81002b9 commit ab79e39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions java_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (c *statusCmd) Execute(_ context.Context, _ *flag.FlagSet, args ...interfac

return nil

}, retry.Delay(c.RetryInterval), retry.Attempts(uint(c.RetryLimit+1)))
}, retry.Delay(c.RetryInterval), retry.DelayType(retry.FixedDelay), retry.Attempts(uint(c.RetryLimit+1)))

if err != nil {
_, _ = fmt.Fprintf(os.Stderr, "failed to ping %s:%d : %s", c.Host, c.Port, err)
Expand Down Expand Up @@ -136,7 +136,7 @@ func (c *statusCmd) ExecuteServerListPing() subcommands.ExitStatus {
}

return nil
}, retry.Delay(c.RetryInterval), retry.Attempts(uint(c.RetryLimit+1)))
}, retry.Delay(c.RetryInterval), retry.DelayType(retry.FixedDelay), retry.Attempts(uint(c.RetryLimit+1)))

if err != nil {
_, _ = fmt.Fprintf(os.Stderr, "failed to ping %s:%d : %s", c.Host, c.Port, err)
Expand Down Expand Up @@ -185,7 +185,7 @@ func (c *statusCmd) ExecuteMcUtilPing(logger *zap.Logger) subcommands.ExitStatus
}

return nil
}, retry.Delay(c.RetryInterval), retry.Attempts(uint(c.RetryLimit+1)))
}, retry.Delay(c.RetryInterval), retry.DelayType(retry.FixedDelay), retry.Attempts(uint(c.RetryLimit+1)))

if err != nil {
_, _ = fmt.Fprintf(os.Stderr, "failed to ping %s:%d : %s", c.Host, c.Port, err)
Expand Down

0 comments on commit ab79e39

Please sign in to comment.