mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #717] Exponential backoff timer #431
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#431
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @systemcrash on GitHub (Aug 18, 2021).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/717
Is your feature request related to a problem? Please describe.
HASS spams the API endpoint with multiple worker threads, despite continuous 429 responses.
Describe the solution you'd like
How about an exponential back-off timer?
Describe alternatives you've considered
Death. 💀
Additional context
HASS approach is to turn a bit of a blind eye here, e.g. https://github.com/home-assistant/core/issues/53776 and who can blame them when they suspect that it's a Spotify issue.
To alleviate the risk of hidden bugs here or there or anywhere, try an exponential backoff.
I was not able to remove and re-add the Spotify add-on in HASS, until
The 429s may be rooted in another problem on their side if they do not provide an adequate
Retry-After:header. But I don't want to get banned from the API endpoint, nor would HASS want to, so a logarithmic back-off would be reassuring.If multiple workers run spotipy to retry, it might be a futile effort (since there may be overlap of retry via HASS worker threads), but if the existing thread backs off, it should help.
@systemcrash commented on GitHub (Aug 18, 2021):
Oops - I see it's already there......
@systemcrash commented on GitHub (Aug 18, 2021):
Is it possible that the Retry-After header contains an http-date and not just delay-seconds ?
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
In which case it is the responsibility of urllib3?
@systemcrash commented on GitHub (Aug 18, 2021):
Nope - they support it. Hmmmm.