Commit 6c612e22 authored by Vincent Pelletier's avatar Vincent Pelletier

cli: Fix RetryingCaucaseClient.

Python was unexpectedly binding utils.until to this class, causing "self"
argument to be automatically generated, which is not expected by this
function.
Tests do not exercise this code path because they are overriding this
property, precisely to check that it gets called...
Also, add docstring.
parent b45adc5a
......@@ -40,7 +40,14 @@ from .client import (
)
class RetryingCaucaseClient(CaucaseClient):
_until = utils.until
"""
Similar to CaucaseClient, but retries indefinitely on http & socket errors.
To use in long-lived processes where server may not be available yet, or is
(hopefuly) temporarily unavailable, etc.
Retries every 10 seconds.
"""
_until = staticmethod(utils.until)
def _request(self, connection, method, url, body=None, headers=None):
while True:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment