Skip to content

Commit a9226f0

Browse files
committed
Rename and document that DANDI_DOWNLOAD_AGGRESSIVE_RETRY "option"
1 parent f52a363 commit a9226f0

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

DEVELOPMENT.md

+4
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ development command line options.
8585
function will patch `requests` to log the results of calls to
8686
`requests.utils.super_len()`
8787

88+
- `DANDI_DOWNLOAD_AGGRESSIVE_RETRY` -- When set, would make `download()` retry
89+
very aggressively - it would keep trying if at least some bytes are downloaded
90+
on each attempt. Typically is not needed and could be a sign of network issues.
91+
8892
## Sourcegraph
8993

9094
The [Sourcegraph](https://sourcegraph.com) browser extension can be used to

dandi/download.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ def _download_file(
750750
# errors (among others) in addition to HTTP status errors.
751751
except requests.RequestException as exc:
752752
sleep_amount = random.random() * 5 * attempt
753-
if os.environ.get("DANDI_DEVEL_AGGRESSIVE_RETRY"):
753+
if os.environ.get("DANDI_DOWNLOAD_AGGRESSIVE_RETRY"):
754754
# in such a case if we downloaded a little more --
755755
# consider it a successful attempt
756756
if downloaded_in_attempt > 0:

0 commit comments

Comments
 (0)