closeio / closeio-api

Python API Client for Close
http://developer.close.com/
MIT License
65 stars 47 forks source link

Add retries for addtional response codes #106

Closed eengoron closed 4 years ago

eengoron commented 4 years ago

This PR adds retries for 503 status codes and 502 and 504 status codes on GET requests.

In terms of intervals for retries, for 503s, each retry we chose a random number between 2 - 4 seconds.

For 502 or 504 GETs, we choose a random integer between 60 and 90 seconds and multiply that by the number of current retries.

I also bumped up the version number to 1.3 even though we never actually released 1.2 to PyPI.