Skip to content

Commit

Permalink
Dedent log msg to always inform on how long we would sleep for one re…
Browse files Browse the repository at this point in the history
…ason or another
  • Loading branch information
yarikoptic committed Feb 11, 2025
1 parent 9cd62a2 commit 7d236cf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions dandi/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,13 +1138,13 @@ def _check_attempts_and_sleep(
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
lgr.debug(
"%s - download failed on attempt #%d: %s, will sleep %f and retry",
path,
attempt,
exc,
sleep_amount,
)
lgr.debug(
"%s - download failed on attempt #%d: %s, will sleep %f and retry",
path,
attempt,
exc,
sleep_amount,
)
time.sleep(sleep_amount)
return attempts_allowed

Expand Down

0 comments on commit 7d236cf

Please sign in to comment.