Skip to content

Commit

Permalink
Start Zarr download as soon as first page of entries is obtained
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Jan 28, 2025
1 parent 5c5c3a3 commit 2db4dba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions dandi/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from dandischema.models import DigestType
from fasteners import InterProcessLock
import humanize
from interleave import FINISH_CURRENT, interleave
from interleave import FINISH_CURRENT, lazy_interleave
import requests

from . import get_logger
Expand Down Expand Up @@ -1013,7 +1013,7 @@ def downloads_gen():
pc.file_qty = len(entries)

final_out: dict | None = None
with interleave(
with lazy_interleave(

Check warning on line 1016 in dandi/download.py

View check run for this annotation

Codecov / codecov/patch

dandi/download.py#L1016

Added line #L1016 was not covered by tests
downloads_gen(),
onerror=FINISH_CURRENT,
max_workers=jobs or 4,
Expand Down Expand Up @@ -1210,7 +1210,6 @@ def get_done(self) -> dict:
}

def get_status(self, report_done: bool = True) -> dict:

state_qtys = Counter(s.state for s in self.files.values())
total = len(self.files)
if (
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ install_requires =
# 3.14.4: https://github.com/hdmf-dev/hdmf/issues/1186
hdmf != 3.5.0,!=3.14.4
humanize
interleave ~= 0.1
interleave ~= 0.3
joblib
keyring != 23.9.0
keyrings.alt
Expand Down

0 comments on commit 2db4dba

Please sign in to comment.