generalize regex to handle another exception message "Cannot perform read: The primary replica isn't connected to a quorum of replicas. ..."

This commit is contained in:
Noah Levitt 2017-05-01 15:29:27 -07:00
parent 6c57b81de8
commit 406a617d01
2 changed files with 2 additions and 2 deletions

View File

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

View File

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