Improved retries
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
@@ -52,6 +52,7 @@ func (h *HTTPClient) Get(url string) (*http.Response, error) {
|
||||
if resp.StatusCode == 429 {
|
||||
fmt.Println("Rate limit exceeded, retrying...")
|
||||
h.retries--
|
||||
time.Sleep(30 * time.Second)
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user