mirror of
https://github.com/rclone/rclone.git
synced 2024-11-24 17:34:57 +01:00
zoho: try to handle rate limits a bit better
This commit is contained in:
parent
f4deffdc96
commit
eceb390152
@ -304,8 +304,9 @@ func shouldRetry(ctx context.Context, resp *http.Response, err error) (bool, err
|
|||||||
fs.Debugf(nil, "Should retry: %v", err)
|
fs.Debugf(nil, "Should retry: %v", err)
|
||||||
}
|
}
|
||||||
if resp != nil && resp.StatusCode == 429 {
|
if resp != nil && resp.StatusCode == 429 {
|
||||||
fs.Errorf(nil, "zoho: rate limit error received, sleeping for 60s: %v", err)
|
err = pacer.RetryAfterError(err, 60*time.Second)
|
||||||
time.Sleep(180 * time.Second)
|
fs.Debugf(nil, "Too many requests. Trying again in %d seconds.", 60)
|
||||||
|
return true, err
|
||||||
}
|
}
|
||||||
return authRetry || fserrors.ShouldRetry(err) || fserrors.ShouldRetryHTTP(resp, retryErrorCodes), err
|
return authRetry || fserrors.ShouldRetry(err) || fserrors.ShouldRetryHTTP(resp, retryErrorCodes), err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user