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:
session.commit()
except:
# TODO: pretty sure we need to add a retry for this..
log.exception("failed to commit changes to database")
raise
log.exception("Failed to read/record temperature data (but will keep trying)")
session.rollback()
finally:
session.close()