[deviantart] limit API wait times to 2**9=512 seconds (#721)

This commit is contained in:
Mike Fährmann
2020-04-30 21:16:09 +02:00
parent 504de79d8b
commit 999efec5cc

View File

@@ -1006,7 +1006,8 @@ class DeviantartOAuthAPI():
msg = "API responded with {} {}".format(
status, response.reason)
if status == 429:
self.delay += 1
if self.delay < 9:
self.delay += 1
self.log.warning("%s. Using %ds delay.", msg, 2 ** self.delay)
else:
self.log.error(msg)