aboutsummaryrefslogtreecommitdiffstats
path: root/lib/prserv/serv.py
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2015-09-23 13:39:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-26 18:03:29 +0100
commitc1b4754f69003df1a83fafc1c80a9ef74400b6dd (patch)
tree03beaca4aad090bbfbd0653bc19b74021f39fcf7 /lib/prserv/serv.py
parentbd6398e967c234e89d773f509512ebf460fa76ff (diff)
downloadbitbake-c1b4754f69003df1a83fafc1c80a9ef74400b6dd.tar.gz
prserv/serv: Close the DB connection out of class destructor
When launching the PR server daemon, the PRData __del__ function was being called (no reason found yet) where the DB connection closed, thus following PR updates were not getting into the DB. This patch closes the connection explicitly, not relaying on the __del__ function execution. Closing the connection in turn causes all WAL file transactions to be moved into the database (checkpoint), thus effectively updating the database. [YOCTO #8215] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/prserv/serv.py')
-rw-r--r--lib/prserv/serv.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/prserv/serv.py b/lib/prserv/serv.py
index 3cb2e03da..c557837b8 100644
--- a/lib/prserv/serv.py
+++ b/lib/prserv/serv.py
@@ -148,7 +148,7 @@ class PRServer(SimpleXMLRPCServer):
while not self.quit:
self.handle_request()
self.handlerthread.join()
- self.table.sync()
+ self.db.disconnect()
logger.info("PRServer: stopping...")
self.server_close()
return