Skip to content

Commit

Permalink
cap the expo backoff at 10 seconds. closes #132
Browse files Browse the repository at this point in the history
  • Loading branch information
wimglenn committed Dec 10, 2023
1 parent 34d73e3 commit 7315ecf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions aocd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def _limiter(self):
log.warning(msg, self._cooloff)
time.sleep(self._cooloff)
self._cooloff *= 2 # double it for repeat offenders
self._cooloff = min(self._cooloff, 10)
self._history.append(now)

def get(self, url, token=None, redirect=True):
Expand Down

0 comments on commit 7315ecf

Please sign in to comment.