Retry all exceptions ond atabase transaction

This commit is contained in:
TheTechRobo 2022-04-02 13:20:29 -04:00
parent 0d52eba410
commit 491f813a54
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ class PlaceScraper:
d = await r.db(db).table(table).insert(data).run(conn)
await conn.close(False)
return d
except rethinkdb.errors.ReqlDriverError as ename:
except Exception as ename:
print(f"Retrying DB transaction... ({ename})")
try:
await conn.close()