Don't kill tempmon client if DB session.commit() fails

let the daemon keep trying just like when device.read() fails
This commit is contained in:
Lance Edgar 2017-08-05 12:49:04 -05:00
parent fa09c939f5
commit ad03e32f77

View file

@ -92,9 +92,8 @@ class TempmonClient(Daemon):
try: try:
session.commit() session.commit()
except: except:
# TODO: pretty sure we need to add a retry for this.. log.exception("Failed to read/record temperature data (but will keep trying)")
log.exception("failed to commit changes to database") session.rollback()
raise
finally: finally:
session.close() session.close()