get, get-url: add --jobs option (#5362)

This commit is contained in:
Batuhan Taskaya
2021-02-02 15:49:58 +02:00
committed by GitHub
parent 31e4a3325d
commit a92bfd272d
6 changed files with 46 additions and 9 deletions
+12
View File
@@ -39,6 +39,7 @@ class CmdGet(CmdBaseNoRepo):
path=self.args.path,
out=self.args.out,
rev=self.args.rev,
jobs=self.args.jobs,
)
return 0
except DvcException:
@@ -84,4 +85,15 @@ def add_parser(subparsers, parent_parser):
help="Print the storage location (URL) the target data would be "
"downloaded from, and exit.",
)
get_parser.add_argument(
"-j",
"--jobs",
type=int,
help=(
"Number of jobs to run simultaneously. "
"The default value is 4 * cpu_count(). "
"For SSH remotes, the default is 4. "
),
metavar="<number>",
)
get_parser.set_defaults(func=CmdGet)