Browse Source

retry for all errors

pull/3472/head
chrislu 2 years ago
parent
commit
f7e0a65e75
  1. 4
      weed/util/retry.go

4
weed/util/retry.go

@ -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
}

Loading…
Cancel
Save