Also reset database connection on error in the backfiller

pull/60/head^2
Christopher Usher 6 years ago
parent e048db0d94
commit 28f350dd46

@ -197,6 +197,9 @@ class BackfillerManager(object):
try:
new_nodes = set(self.get_nodes())
except Exception:
# To ensure a fresh slate and clear any DB-related errors, get a new conn on error.
# This is heavy-handed but simple and effective.
self.connection = database.DBManager(dsn=self.node_database).get_conn()
if failures < MAX_BACKOFF:
failures += 1
delay = common.jitter(TIMEOUT * 2**failures)

Loading…
Cancel
Save