summaryrefslogtreecommitdiffstats
path: root/module/database/DatabaseBackend.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-10-13 21:39:58 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-10-13 21:39:58 +0200
commit7e7adc64713f74976d5994af36b5f758620fb37b (patch)
tree868084317f8818dbb327c76eaff3c7c7edce0231 /module/database/DatabaseBackend.py
parentfixed JsEngine init (diff)
downloadpyload-7e7adc64713f74976d5994af36b5f758620fb37b.tar.xz
added JSON and WS client, re organized tests, new classes for easier api tests
Diffstat (limited to 'module/database/DatabaseBackend.py')
-rw-r--r--module/database/DatabaseBackend.py9
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"""