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