Skip to content

Commit

Permalink
Improved message for communication interruptions (#189)
Browse files Browse the repository at this point in the history
* Improved message for communication interruptions

* Removed unused variable
  • Loading branch information
szymon-kuklewicz authored Nov 4, 2019
1 parent d9d63ad commit 95e6569
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions neptune/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,9 @@ def wrapper(*args, **kwargs):
raise SSLError()
except (BravadoConnectionError, BravadoTimeoutError,
requests.exceptions.ConnectionError, requests.exceptions.Timeout,
HTTPRequestTimeout, HTTPServiceUnavailable, HTTPGatewayTimeout) as ex:
_logger.warning('Http request to Neptune server failed: %s. Retry in %d seconds.', repr(ex), 2 ** retry)
HTTPRequestTimeout, HTTPServiceUnavailable, HTTPGatewayTimeout):
if retry >= 6:
_logger.warning('Experiencing connection interruptions. Reestablishing communication with Neptune.')
time.sleep(2 ** retry)
continue
except HTTPServerError:
Expand Down

0 comments on commit 95e6569

Please sign in to comment.