调小chunk-size

This commit is contained in:
2025-07-18 13:54:38 +08:00
parent 4b080771f6
commit f23bcfdd25

View File

@@ -35,7 +35,7 @@ def upload_to_oss(url, file_path):
new_url = new_url.split("?", 1)[0] new_url = new_url.split("?", 1)[0]
r_span.set_attribute("rclone.target_dir", new_url) r_span.set_attribute("rclone.target_dir", new_url)
if new_url != url: if new_url != url:
result = os.system(f"rclone copyto --no-check-dest --ignore-existing --multi-thread-chunk-size 32M --multi-thread-streams 8 {file_path} {new_url}") result = os.system(f"rclone copyto --no-check-dest --ignore-existing --multi-thread-chunk-size 8M --multi-thread-streams 8 {file_path} {new_url}")
r_span.set_attribute("rclone.result", result) r_span.set_attribute("rclone.result", result)
if result == 0: if result == 0:
span.set_status(Status(StatusCode.OK)) span.set_status(Status(StatusCode.OK))