Skip to content

Commit

Permalink
Continue retrying downloads on retriable statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Dec 20, 2024
1 parent 29009f6 commit f7e6ea4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dandi/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,8 +1141,12 @@ def _check_if_more_attempts_allowed(
exc,
)
else:
lgr.debug("%s - download failed: %s", path, exc)
return None
lgr.debug(

Check warning on line 1144 in dandi/download.py

View check run for this annotation

Codecov / codecov/patch

dandi/download.py#L1144

Added line #L1144 was not covered by tests
"%s - download failed on attempt #%d: %s, will sleep a bit and retry",
path,
attempt,
exc,
)
elif attempt >= attempts_allowed:
lgr.debug("%s - download failed after %d attempts: %s", path, attempt, exc)
return None
Expand Down

0 comments on commit f7e6ea4

Please sign in to comment.