feat(cli): add download batch-size option #992
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sets default to 1/4 of upload
Description
Summary generated by Reviewpad on 22 Nov 23 09:07 UTC
This pull request adds a new option for the batch size in the command line interface (CLI) for parallel handling of chunks during payment and upload processing. Additionally, it also adds a batch size option for parallel downloading. The default value for the download batch size is set to one-fourth of the upload batch size. The changes are made in the
sn_cli/src/subcommands/files/mod.rs
andsn_client/src/file_apis.rs
files. The patch adds new command line options and modifies thefiles_cmds
function to handle the new batch size options. It also adds new functionsdownload_files
,download_file
, and modifies theverify_and_repay_if_needed_once
function to accommodate the new batch size option for parallel downloading.