From 6f083fc72a7bf7042cb2fc587b4d64d22753af67 Mon Sep 17 00:00:00 2001 From: "samzong.lu" Date: Tue, 19 Mar 2024 17:08:15 +0800 Subject: [PATCH] workflow: use parallel sync file to ucloud Signed-off-by: samzong.lu --- scripts/upload-ucloud.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/upload-ucloud.py b/scripts/upload-ucloud.py index 0f0873f..7328413 100644 --- a/scripts/upload-ucloud.py +++ b/scripts/upload-ucloud.py @@ -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)