diff options
Diffstat (limited to 'module/database/DatabaseBackend.py')
-rw-r--r-- | module/database/DatabaseBackend.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/module/database/DatabaseBackend.py b/module/database/DatabaseBackend.py index b22f8ffc5..6e67c799a 100644 --- a/module/database/DatabaseBackend.py +++ b/module/database/DatabaseBackend.py @@ -190,19 +190,18 @@ class DatabaseBackend(Thread): j = self.jobs.get() if j == "quit": self.c.close() + self.conn.commit() self.conn.close() + self.closing.set() break j.processJob() def shutdown(self): self.running.clear() - self._shutdown() - - @queue - def _shutdown(self): - self.conn.commit() + self.closing = Event() self.jobs.put("quit") + self.closing.wait(1) def _checkVersion(self): """ get db version""" |