Commit 9a8c21ac authored by Jeffrey Morgan's avatar Jeffrey Morgan
Browse files

use exponential everywhere

parent f6b317e8
...@@ -181,7 +181,7 @@ func (b *blobUpload) Run(ctx context.Context, opts *RegistryOptions) { ...@@ -181,7 +181,7 @@ func (b *blobUpload) Run(ctx context.Context, opts *RegistryOptions) {
resp, err := makeRequestWithRetry(ctx, http.MethodPut, requestURL, headers, nil, opts) resp, err := makeRequestWithRetry(ctx, http.MethodPut, requestURL, headers, nil, opts)
if err != nil { if err != nil {
b.err = err b.err = err
sleep := 200*time.Millisecond + time.Duration(try)*time.Second/4 sleep := time.Second * time.Duration(math.Pow(2, float64(try)))
log.Printf("%s complete upload attempt %d failed: %v, retrying in %s", b.Digest[7:19], try, err, sleep) log.Printf("%s complete upload attempt %d failed: %v, retrying in %s", b.Digest[7:19], try, err, sleep)
time.Sleep(sleep) time.Sleep(sleep)
continue continue
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment