Decrease log noise by logging retry loops after the initial attempt
parent
15dfcd1aa1
commit
fcaf89666f
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue