bitbake persist_data: Use immediate connection mode
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2362 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
parent
89853852ed
commit
9858ddb9c5
|
@ -50,7 +50,7 @@ class PersistData:
|
||||||
self.cachefile = os.path.join(self.cachedir,"bb_persist_data.sqlite3")
|
self.cachefile = os.path.join(self.cachedir,"bb_persist_data.sqlite3")
|
||||||
bb.msg.debug(1, bb.msg.domain.PersistData, "Using '%s' as the persistent data cache" % self.cachefile)
|
bb.msg.debug(1, bb.msg.domain.PersistData, "Using '%s' as the persistent data cache" % self.cachefile)
|
||||||
|
|
||||||
self.connection = sqlite3.connect(self.cachefile, timeout=5, isolation_level=None)
|
self.connection = sqlite3.connect(self.cachefile, timeout=5, isolation_level="IMMEDIATE")
|
||||||
|
|
||||||
def addDomain(self, domain):
|
def addDomain(self, domain):
|
||||||
"""
|
"""
|
||||||
|
@ -85,6 +85,7 @@ class PersistData:
|
||||||
self.connection.execute("UPDATE %s SET value=? WHERE key=?;" % domain, [value, key])
|
self.connection.execute("UPDATE %s SET value=? WHERE key=?;" % domain, [value, key])
|
||||||
else:
|
else:
|
||||||
self.connection.execute("INSERT into %s(key, value) values (?, ?);" % domain, [key, value])
|
self.connection.execute("INSERT into %s(key, value) values (?, ?);" % domain, [key, value])
|
||||||
|
self.connection.commit()
|
||||||
|
|
||||||
def delValue(self, domain, key):
|
def delValue(self, domain, key):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue