Refactor main server loop a bit, to add basic retry w/ error logging

hopefully this lets us get past a simple Postgres restart..
This commit is contained in:
Lance Edgar 2017-06-01 17:16:31 -05:00
parent 27adc5ed70
commit c4b371cedd
2 changed files with 20 additions and 17 deletions

View file

@ -92,6 +92,7 @@ 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