From 7e7adc64713f74976d5994af36b5f758620fb37b Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 13 Oct 2012 21:39:58 +0200 Subject: added JSON and WS client, re organized tests, new classes for easier api tests --- module/database/DatabaseBackend.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'module/database/DatabaseBackend.py') 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""" -- cgit v1.2.3