Chris Withers wrote:
I'm using v3.6. Unless I'm missing something, it's the most recent
Andrew McLean wrote:
Any advice gratefully received.
I'd suggested moving to a ZODB version new enough to have MVCC
support, which will likely make your problem go away...
Since my first post I tried another approach. Namely creating (and
using) a new connection instance in the thread that raised the
ReadConflictError exception. It "seems" to work, but I would like to
understand this a bit better.
"""Downloader class to download urls"""
def __init__(self, id, taskQueue, resultQueue, db):
self.id = id
self.__taskQueue = taskQueue
self.__resultQueue = resultQueue
self.__db = db
self.__results = self.__db.open().root()['done']
# Get task from the queue
task = self.__taskQueue.get()
if (task == 1) or (not self.done(task)):
def done(self, task):
print "*** ReadConflictError raised: Generate new
connection to database ***"
For more information about ZODB, see the ZODB Wiki:
ZODB-Dev mailing list - ZODB-Dev@zope.org