Skip to content

Commit

Permalink
RF: Do not bother logging yet another debug msg on Retry-After in dow…
Browse files Browse the repository at this point in the history
…nload
  • Loading branch information
yarikoptic committed Feb 11, 2025
1 parent 2b43e05 commit 9cd62a2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions dandi/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,15 +1134,7 @@ def _check_attempts_and_sleep(
exc,
)
return None
if (sleep_amount := get_retry_after(exc.response)) is not None:
lgr.debug(
"%s - download failed due to response %d with "
"Retry-After=%d: %s, will sleep and retry",
path,
exc.response.status_code,
sleep_amount,
exc,
)
sleep_amount = get_retry_after(exc.response)
if sleep_amount is None:
# it was not Retry-after set, so we come up with random duration to sleep
sleep_amount = random.random() * 5 * attempt
Expand Down

0 comments on commit 9cd62a2

Please sign in to comment.