-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMPROVEMENT] Prevent 429 error with bandcamp api #55
base: master
Are you sure you want to change the base?
Conversation
thegass
commented
Oct 24, 2024
- add random wait between requests
- increases runtime but handles my > 5000 releases collection fine.
* add random wait between requests * increases runtime but handles my > 5000 releases collection fine.
Thanks for the proposal! Instead of modifying business logic in two different places, would it make sense instead to simply replace the WDYT? |
I think that would work f. the actual downloads. But I think if you get a retry while collecting the available releases you already have triggered the rate-limiter (seems to be a rather stupid ip-based (maybe + cookie) limiter which blocks your ip for a few minutes, if you get 429 on cli you also get them inside the browser). |
Just to make sure I understand your analysis correctly, you think that when a retry happens, it's already too late? Which means we require random sleeps systematically, to prevent these cases from happening entirely? |
I don't know if it needs to be random or if it would be enough to sleep long enough. But in my tests (with my rather big collection) the crucial part was the I also tried smaller sleep there (to speed up).
I settled on Seconds for my build to be on the safe side. |
As a first attempt to provide this feature, we could consider a new option That would match your proposal and need? |
Sounds like a good idea. |
Great. Feel free to make the changes inside this PR directly (since I will squash the commits in the end), or to create a new one if you prefer. |
Ok. Hope I find some time this weekend to implement it. |
sorry for delay. |