]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
toaster: work around 'database is locked' error
authorEd Bartosh <ed.bartosh@linux.intel.com>
Thu, 10 Dec 2015 03:56:40 +0000 (19:56 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 14 Dec 2015 23:12:44 +0000 (23:12 +0000)
commiteb305308ca8f6228c6f52dac1bd941f29c7e5eb6
tree1cda3567e178a1d483a1aa1f241132aeb626d2e0
parentd5ca2bae623db214764324da5c9e4dac6beef760
toaster: work around 'database is locked' error

When sqlite can not cope with a stream of 'insert' queries it throws
'database is locked' exception.

Wrapping model.save in transaction.atomic context and repeating the call
should solve this issue.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/toaster/orm/models.py