retry for all errors

This commit is contained in:
chrislu 2022-08-20 23:34:45 -07:00
parent 649555b223
commit f7e0a65e75

View file

@ -23,11 +23,11 @@ func Retry(name string, job func() error) (err error) {
if strings.Contains(err.Error(), "transport") {
hasErr = true
glog.V(0).Infof("retry %s: err: %v", name, err)
time.Sleep(waitTime)
waitTime += waitTime / 2
} else {
break
}
time.Sleep(waitTime)
waitTime += waitTime / 2
}
return err
}