mirror of
https://github.com/clearml/clearml
synced 2025-04-02 12:08:33 +00:00
Fix default num of retries when uploading files (should be 3, not 1)
This commit is contained in:
parent
e5846f6ba2
commit
6bba270620
@ -91,7 +91,7 @@ class CacheManager(object):
|
||||
return cached_file
|
||||
|
||||
@staticmethod
|
||||
def upload_file(local_file, remote_url, wait_for_upload=True, retries=1):
|
||||
def upload_file(local_file, remote_url, wait_for_upload=True, retries=3):
|
||||
# type: (str, str, bool, int) -> Optional[str]
|
||||
helper = StorageHelper.get(remote_url)
|
||||
result = helper.upload(
|
||||
|
@ -604,7 +604,7 @@ class StorageHelper(object):
|
||||
|
||||
return dest_path
|
||||
|
||||
def upload(self, src_path, dest_path=None, extra=None, async_enable=False, cb=None, retries=1):
|
||||
def upload(self, src_path, dest_path=None, extra=None, async_enable=False, cb=None, retries=3):
|
||||
if not dest_path:
|
||||
dest_path = os.path.basename(src_path)
|
||||
|
||||
|
@ -54,7 +54,7 @@ class StorageManager(object):
|
||||
|
||||
@classmethod
|
||||
def upload_file(
|
||||
cls, local_file, remote_url, wait_for_upload=True, retries=1
|
||||
cls, local_file, remote_url, wait_for_upload=True, retries=3
|
||||
): # type: (str, str, bool, int) -> str
|
||||
"""
|
||||
Upload a local file to a remote location. remote url is the finale destination of the uploaded file.
|
||||
@ -70,7 +70,7 @@ class StorageManager(object):
|
||||
:param str local_file: Full path of a local file to be uploaded
|
||||
:param str remote_url: Full path or remote url to upload to (including file name)
|
||||
:param bool wait_for_upload: If False, return immediately and upload in the background. Default True.
|
||||
:param int retries: Number of retries before failing to upload file, default 1.
|
||||
:param int retries: Number of retries before failing to upload file, default 3.
|
||||
:return: Newly uploaded remote URL.
|
||||
"""
|
||||
return CacheManager.get_cache_manager().upload_file(
|
||||
|
Loading…
Reference in New Issue
Block a user