Skip to content

Commit

Permalink
pass checksum jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Aug 12, 2024
1 parent d704a19 commit 7c5c496
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dvc/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ def __init__( # noqa: PLR0913
**fs_kwargs,
)
self.fs = fs_cls(**fs_config)
self._checksum_jobs = self.fs.hash_jobs

if (
self.fs.protocol == "local"
Expand Down Expand Up @@ -543,6 +544,7 @@ def _build(
disable=no_progress_bar,
) as pb:
kwargs["callback"] = pb.as_callback()
kwargs.setdefault("checksum_jobs", self._checksum_jobs)
return build(*args, **kwargs)

def _get_hash_meta(self):
Expand Down Expand Up @@ -731,6 +733,7 @@ def _checkout(self, *args, **kwargs) -> Optional[bool]:
from dvc_data.hashfile.checkout import LinkError, PromptError

kwargs.setdefault("ignore", self.dvcignore)
kwargs.setdefault("checksum_jobs", self._checksum_jobs)
try:
return checkout(*args, **kwargs)
except PromptError as exc:
Expand Down
1 change: 1 addition & 0 deletions dvc/repo/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@ def build_data_index( # noqa: C901, PLR0912
state=index.repo.state,
ignore=ignore,
hash_name=hash_name,
checksum_jobs=fs.hash_jobs,
):
if not entry.key or entry.key == ("",):
# NOTE: whether the root will be returned by build_entries
Expand Down

0 comments on commit 7c5c496

Please sign in to comment.