mirror of
https://github.com/clearml/clearml
synced 2025-01-31 00:56:57 +00:00
Add ChunkedEncodingError, ContentDecodingError and StreamConsumedError to retry list
This commit is contained in:
parent
27021a1a19
commit
0af630e9cf
@ -12,6 +12,7 @@ import jwt
|
||||
import requests
|
||||
import six
|
||||
from requests.auth import HTTPBasicAuth
|
||||
from requests.exceptions import ChunkedEncodingError, ContentDecodingError, StreamConsumedError
|
||||
from six.moves.urllib.parse import urlparse, urlunparse
|
||||
from typing import List, Optional
|
||||
|
||||
@ -418,6 +419,13 @@ class Session(TokenManager):
|
||||
(self._logger or get_logger()).warning("SSLError Retrying {}".format(ex))
|
||||
sleep(0.1)
|
||||
continue
|
||||
except (ChunkedEncodingError, ContentDecodingError, StreamConsumedError) as ex:
|
||||
retry_counter += 1
|
||||
# we should retry
|
||||
if retry_counter >= self._ssl_error_count_verbosity:
|
||||
(self._logger or get_logger()).warning("Network decoding error Retrying {}".format(ex))
|
||||
sleep(0.1)
|
||||
continue
|
||||
|
||||
if (
|
||||
refresh_token_if_unauthorized
|
||||
|
Loading…
Reference in New Issue
Block a user