From 20e3b83525be2f363cabc1ece23ac6878542df0b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 1 Jun 2017 16:21:48 -0500 Subject: [PATCH] Add error logging in case committing session fails.. probably need to add a retry somewhere but still not getting the traceback we need to figure that out... --- rattail_tempmon/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rattail_tempmon/client.py b/rattail_tempmon/client.py index 3e59b5c..e5bcd65 100644 --- a/rattail_tempmon/client.py +++ b/rattail_tempmon/client.py @@ -89,7 +89,11 @@ class TempmonClient(Daemon): # make sure we show as being online if not client.online: client.online = True - session.commit() + try: + session.commit() + except: + log.exception("failed to commit changes to database") + raise finally: session.close()