mirror of
https://github.com/c0de-archive/spotipy.git
synced 2024-11-14 02:57:27 +00:00
Adjusted retry sleep backoff
This commit is contained in:
parent
6261eae0e2
commit
7499d8e511
@ -156,7 +156,7 @@ class Spotify(object):
|
||||
else:
|
||||
sleep_seconds = int(e.headers.get('Retry-After', delay))
|
||||
print ('retrying ...' + str(sleep_seconds) + 'secs')
|
||||
time.sleep(sleep_seconds)
|
||||
time.sleep(sleep_seconds + 1)
|
||||
delay += 1
|
||||
else:
|
||||
raise
|
||||
@ -169,7 +169,7 @@ class Spotify(object):
|
||||
if retries >= 0:
|
||||
sleep_seconds = int(e.headers.get('Retry-After', delay))
|
||||
print ('retrying ...' + str(delay) + 'secs')
|
||||
time.sleep(sleep_seconds)
|
||||
time.sleep(sleep_seconds + 1)
|
||||
delay += 1
|
||||
else:
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user