Skip to content

Commit

Permalink
Merge pull request #19 from samzong/workflow/use-parallel-sync
Browse files Browse the repository at this point in the history
workflow: use parallel sync file to ucloud
  • Loading branch information
samzong authored Mar 19, 2024
2 parents b8ae6e7 + 6f083fc commit 6dbe621
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions scripts/upload-ucloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,12 @@ def do_upload_cli(file, public_key, private_key, region, bucket):

if os.path.isdir(file):
out = subprocess.run(
[cmd, 'cp', '-r', file, bucket, '--accesskey', public_key, '--secretkey',
private_key,
'--endpoint',
region])
[cmd, 'cp', '-r', file, bucket, '--accesskey', public_key, '--secretkey', private_key,
'--endpoint', region, '--parallel', '20'])
elif os.path.isfile(file):
out = subprocess.run(
[cmd, 'cp', file, bucket, '--accesskey', public_key, '--secretkey', private_key,
'--endpoint',
region])
'--endpoint', region, '--parallel', '20'])

if out.returncode != 0:
raise Exception("ucloud upload error", out.returncode)
Expand Down

0 comments on commit 6dbe621

Please sign in to comment.