remote: fix pull error for large file with aliyun-oss (#5053)

Fixes #5051

Co-authored-by: Gary Yuan <[email protected]>
This commit is contained in:
OrangeCube
2020-12-08 13:00:20 +02:00
committed by GitHub
co-authored by Gary Yuan
parent b072370efb
commit 6c7eccf5fd
+7 -2
View File
@@ -128,6 +128,11 @@ class OSSTree(BaseTree): # pylint:disable=abstract-method
self, from_info, to_file, name=None, no_progress_bar=False, **_kwargs
):
with Tqdm(desc=name, disable=no_progress_bar, bytes=True) as pbar:
self.oss_service.get_object_to_file(
from_info.path, to_file, progress_callback=pbar.update_to
import oss2
oss2.resumable_download(
self.oss_service,
from_info.path,
to_file,
progress_callback=pbar.update_to,
)