]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
prserv/db: Threading fixes
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Aug 2013 16:06:10 +0000 (16:06 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 28 Aug 2013 23:12:29 +0000 (00:12 +0100)
commit5709efc2ff1e36529bd28f49cd093ccfa7abff7f
treee99a0a42cab270b2476366271aaff8447c3ffd25
parent85fed8acc3af3e15bf119db2f51c486a9de3646b
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/prserv/db.py
lib/prserv/serv.py