Skip to content

Commit

Permalink
Merge pull request #3477 from tstromberg/retry-loop-0
Browse files Browse the repository at this point in the history
Decrease log noise by logging retry loops after the initial attempt
  • Loading branch information
tstromberg authored Dec 21, 2018
2 parents 6f169b0 + fcaf896 commit 94245d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/util/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ func Retry(attempts int, callback func() error) (err error) {
func RetryAfter(attempts int, callback func() error, d time.Duration) (err error) {
m := MultiError{}
for i := 0; i < attempts; i++ {
glog.V(1).Infof("retry loop %d", i)
if i > 0 {
glog.V(1).Infof("retry loop %d", i)
}
err = callback()
if err == nil {
return nil
Expand Down

0 comments on commit 94245d0

Please sign in to comment.