Skip to content

Commit

Permalink
Merge pull request #45 from kvalev/kvv-overpass-429-retry
Browse files Browse the repository at this point in the history
Retry on 429 status code from Overpass
  • Loading branch information
kvalev authored Dec 1, 2021
2 parents 8734a1c + 8197d65 commit fef2296
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/hub/overpass/overpass.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ func queryOverpass(query string) (result OverpassResponse, err error) {
params.Set("data", fmt.Sprintf("[out:json];%s", query))

client := pester.New()
client.MaxRetries = 7
client.RetryOnHTTP429 = true
client.MaxRetries = 5
client.Backoff = pester.ExponentialBackoff

r, err := client.PostForm(OverpassUrl, params)
Expand Down

0 comments on commit fef2296

Please sign in to comment.