Skip to content
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

Debug line to let users know how long to wait from retry-after #2911

Open
stephanebruckert opened this issue Feb 2, 2023 · 1 comment
Open

Comments

@stephanebruckert
Copy link

stephanebruckert commented Feb 2, 2023

Context

In spotipy we use urllib3's retry mechanism but many issues have been reported because some calls just "hang" and no feedback is reported back to the user about how long to wait. Sometimes it could be a full hour if the retry-after happens to be 3600 spotipy-dev/spotipy#862 (comment)

See spotipy-dev/spotipy#937 spotipy-dev/spotipy#913 spotipy-dev/spotipy#862 spotipy-dev/spotipy#844 spotipy-dev/spotipy#790

Can we add a debug log to let users know how long to wait?

Alternatives

We can log it without urllib3, building our own retry

Contribution

I can submit a PR but would need to know if you would be OK with adding a debug line around:

time.sleep(retry_after)

@stephanebruckert
Copy link
Author

@SethMichaelLarson sorry for the direct mention, I saw you were active.

What do you think of this? Happy to open a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant