Fix exception handling in changefeed

This commit is contained in:
vrde 2017-02-27 11:14:11 +01:00
parent 213139d4c6
commit f9748042c2
No known key found for this signature in database
GPG Key ID: 6581C7C39B3D397D

View File

@ -24,8 +24,8 @@ class RethinkDBChangeFeed(ChangeFeed):
try:
self.run_changefeed()
break
except BackendError as exc:
logger.exception(exc)
except (BackendError, r.ReqlDriverError) as exc:
logger.exception('Error connecting to the database, retrying')
time.sleep(1)
def run_changefeed(self):