python-consul icon indicating copy to clipboard operation
python-consul copied to clipboard

Retry logic for KV

Open paulchoi opened this issue 9 years ago • 2 comments

Does python-consul handle retrying when an error is encountered during a KV operation? In an unreliable environment, I sometimes see Consul return 500 error.

I can certainly refactor my code and use something like retrying, if retry is out of python-consul's scope.

For cases where consul.Consul is used, I can configure requests's HTTPAdapter, but in most cases I am using consul.aio.

paulchoi avatar May 27 '16 06:05 paulchoi

@paulchoi I would think that the retry handling logic would be out of scope for python-consul as it is a library. That said, I am happy to be persuaded otherwise if someone has a sane PR that handles the case across the board (ie. all clients).

abn avatar Jun 20 '16 16:06 abn

I'd say that retry logic should be handled at the application level.

beardedeagle avatar Aug 08 '17 16:08 beardedeagle