Skip to content

Commit

Permalink
Pass max batch/file workers kwargs into generic fs
Browse files Browse the repository at this point in the history
  • Loading branch information
bhperry committed Mar 5, 2024
1 parent a716678 commit eb9837a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions saturnfs/client/saturnfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,18 @@ def rm_bulk(self, paths: List[str], callback: Callback = DEFAULT_CALLBACK):
self.invalidate_cache(full_path(owner_name, path))
i += settings.OBJECT_STORAGE_MAX_LIST_COUNT

def rsync(self, source: str, destination: str, delete_missing: bool = False, **kwargs):
kwargs["fs"] = SaturnGenericFilesystem()
def rsync(
self,
source: str,
destination: str,
delete_missing: bool = False,
max_batch_workers: int = settings.SATURNFS_DEFAULT_MAX_WORKERS,
max_file_workers: int = 1,
**kwargs,
):
kwargs["fs"] = SaturnGenericFilesystem(
max_batch_workers=max_batch_workers, max_file_workers=max_file_workers
)
return rsync(source, destination, delete_missing=delete_missing, **kwargs)

def list_uploads(
Expand Down

0 comments on commit eb9837a

Please sign in to comment.