tgherzog / wbgapi

Python module that makes using the World Bank's API a lot easier and more intuitive.
MIT License
140 stars 31 forks source link

retry mechanism #11

Open tgherzog opened 4 years ago

tgherzog commented 4 years ago

API is prone to responding "503 Service Unavailable" at random intervals, and typically if you wait a few seconds and try again it works. So we might want to add an optional retry mechanism

tgherzog commented 4 years ago

Here's a way to implement this:

https://stackoverflow.com/questions/567622/is-there-a-pythonic-way-to-try-something-up-to-a-maximum-number-of-times

mo-cmyk commented 2 years ago

Hi, I can take a look at this issue.