From 8f27f50b34decb8e7edb76f9f42bd9ab9a6e3d58 Mon Sep 17 00:00:00 2001 From: shortcutme Date: Tue, 19 Nov 2019 02:09:36 +0100 Subject: [PATCH] Log SQL statements in progress as warning --- src/Db/Db.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Db/Db.py b/src/Db/Db.py index fd6eec32..2d1b2e66 100644 --- a/src/Db/Db.py +++ b/src/Db/Db.py @@ -124,7 +124,10 @@ class Db(object): self.log.debug("Commited in %.3fs (reason: %s)" % (time.time() - s, reason)) return True except Exception as err: - self.log.error("Commit error: %s" % err) + if "SQL statements in progress" in str(err): + self.log.warning("Commit delayed: %s (reason: %s)" % (Debug.formatException(err), reason)) + else: + self.log.error("Commit error: %s (reason: %s)" % (Debug.formatException(err), reason)) return False def insertOrUpdate(self, *args, **kwargs):