MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / RetryFileServer

Class RetryFileServer

client/util/api/fileserver.py:142–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140
141
142class RetryFileServer(object):
143 def __init__(self, retry_times=-1):
144 """
145 构造函数
146 :param retry_times: 重试次数,默认-1,即一直重试直到成功
147 :return:
148 """
149 self._retry_times = retry_times
150
151 def retry_on_error(self, error, method_name):
152 """
153 失败重试函数
154 :param error:
155 :param method_name:
156 :return:
157 """
158 return
159
160 def get_server(self, server_url=None):
161 """
162 获取一个server实例
163 :return:
164 """
165 file_server = FileServer(server_url=server_url)
166 return wrapper.Retry(server=file_server, on_error=self.retry_on_error, total=self._retry_times)

Callers 5

upload_fileMethod · 0.90
file_server_downloadMethod · 0.90
__download_databaseMethod · 0.90
__upload_databaseMethod · 0.90
download_toolMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected