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>
self.connection.execute("PRAGMA journal_mode = WAL;")
self._tables={}
- def __del__(self):
+ def disconnect(self):
self.connection.close()
def __getitem__(self,tblname):
while not self.quit:
self.handle_request()
self.handlerthread.join()
- self.table.sync()
+ self.db.disconnect()
logger.info("PRServer: stopping...")
self.server_close()
return