mirror of
https://github.com/clearml/clearml-agent
synced 2025-02-26 05:59:24 +00:00
Fix session should retry on Any error if send fails
This commit is contained in:
parent
0e2657421f
commit
d30d4e7e61
@ -330,6 +330,7 @@ class Session(TokenManager):
|
|||||||
if version
|
if version
|
||||||
else "{host}/{service}.{action}"
|
else "{host}/{service}.{action}"
|
||||||
).format(**locals())
|
).format(**locals())
|
||||||
|
res = None
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
if data and len(data) > self._write_session_data_size:
|
if data and len(data) > self._write_session_data_size:
|
||||||
@ -342,7 +343,7 @@ class Session(TokenManager):
|
|||||||
try:
|
try:
|
||||||
res = self.__http_session.request(
|
res = self.__http_session.request(
|
||||||
method, url, headers=headers, auth=auth, data=data, json=json, timeout=timeout, params=params)
|
method, url, headers=headers, auth=auth, data=data, json=json, timeout=timeout, params=params)
|
||||||
except RequestException as ex:
|
except Exception as ex:
|
||||||
if self._propagate_exceptions_on_send:
|
if self._propagate_exceptions_on_send:
|
||||||
raise
|
raise
|
||||||
sleep_time = sys_random.uniform(*self._request_exception_retry_timeout)
|
sleep_time = sys_random.uniform(*self._request_exception_retry_timeout)
|
||||||
|
Loading…
Reference in New Issue
Block a user