From: Michael Tremer Date: Wed, 1 Nov 2017 11:51:18 +0000 (+0100) Subject: database: Log when connection was lost X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d06b2491078977e4ff071a3a604c7f7ec59df1b5;p=ipfire.org.git database: Log when connection was lost Signed-off-by: Michael Tremer --- diff --git a/webapp/backend/database.py b/webapp/backend/database.py index e10bbdb1..b158baa9 100644 --- a/webapp/backend/database.py +++ b/webapp/backend/database.py @@ -163,6 +163,8 @@ class Connection(object): def _ensure_connected(self): if self._db is None: + logging.warning("Database connection was lost...") + self.reconnect() def _cursor(self):