edgi-govdata-archiving / wayback

A Python API to the Internet Archive Wayback Machine
https://wayback.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
61 stars 12 forks source link

A little more rate limit tweaking for v0.4.4 #142

Closed Mr0grog closed 9 months ago

Mr0grog commented 9 months ago

This adds a bunch of little tweaks related to the recent rate limit work. It should be more-or-less ready for release after this.

The main thing is adding a 60-second delay for 429 (rate limit) responses. Looking back at the docstring for the RateLimitError class, I think I might have originally intended to always raise instead of retry these, but git history shows it never actually worked that way. I want to get a patch release out with the new retry timings and logs, but patch release doesn’t seem like a good time change whether a response gets retried, so I’ve just made a longer delay here for now.

Then some other assorted bits and bobs: