Skip to content

Commit

Permalink
SDK-383: Add retries to get calls in case of 500 Response (qubole#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
chattarajoy authored Dec 9, 2019
1 parent 6ce017b commit 99544a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qds_sdk/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ def __init__(self, auth, rest_url, skip_ssl_cert_check, reuse=True):
self.session_with_retries = requests.Session()
self.session_with_retries.mount('https://', MyAdapter(max_retries=3))

@retry((RetryWithDelay, requests.Timeout), tries=6, delay=30, backoff=2)
@retry((RetryWithDelay, requests.Timeout, ServerError), tries=6, delay=30, backoff=2)
def get_raw(self, path, params=None):
return self._api_call_raw("GET", path, params=params)

@retry((RetryWithDelay, requests.Timeout), tries=6, delay=30, backoff=2)
@retry((RetryWithDelay, requests.Timeout, ServerError), tries=6, delay=30, backoff=2)
def get(self, path, params=None):
return self._api_call("GET", path, params=params)

Expand Down

0 comments on commit 99544a9

Please sign in to comment.