retry in case of another type of recoverable error from a rethinkdb operation

This commit is contained in:
Noah Levitt 2017-06-27 10:58:30 -07:00
parent b063fdc1fb
commit 7cf33a81ea
2 changed files with 2 additions and 3 deletions

View File

@ -69,8 +69,7 @@ class RethinkerWrapper(object):
time.sleep(0.5)
except r.ReqlOpFailedError as e:
if e.args and re.match(
'^Cannot perform.*primary replica.*',
e.args[0]):
'^Cannot perform.*replica.*', e.args[0]):
self.logger.error(
'will keep trying after potentially recoverable '
'error: %s', e)

View File

@ -3,7 +3,7 @@ import codecs
setuptools.setup(
name='doublethink',
version='0.2.0.dev82',
version='0.2.0.dev83',
packages=['doublethink'],
classifiers=[
'Programming Language :: Python :: 2.7',