1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-02 13:29:49 +00:00

bitbake: prserv/db: Threading fixes

Enabling threading for the PRServer causes a number of issues. Firstly is
the obtuse error:

sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type

which is due to the class not being derived from object. See:
http://docs.python.org/2/library/sqlite3.html#registering-an-adapter-callable

Secondly, we want to enable multithreadded access to the database so we do this
when we open it. This opens the way up to multithreading the PR server.

(Bitbake rev: 5709efc2ff1e36529bd28f49cd093ccfa7abff7f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2013-08-28 16:06:10 +00:00
parent 5fba9d8c6c
commit 06d7664590
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -165,7 +165,7 @@ class PRServer(SimpleXMLRPCServer):
self.delpid()
os._exit(0)
class PRServSingleton():
class PRServSingleton(object):
def __init__(self, dbfile, logfile, interface):
self.dbfile = dbfile
self.logfile = logfile
@@ -182,7 +182,7 @@ class PRServSingleton():
def getinfo(self):
return (self.host, self.port)
class PRServerConnection():
class PRServerConnection(object):
def __init__(self, host, port):
if is_local_special(host, port):
host, port = singleton.getinfo()