Commit 56d924c9 authored by Jean-Paul Smets's avatar Jean-Paul Smets

bugfixes


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@697 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1835e1b8
......@@ -62,7 +62,8 @@ class SQLDict(RAMDict):
def prepareDeleteMessage(self, activity_tool, m):
# Erase all messages in a single transaction
uid_list = activity_tool.SQLDict_readUidList(path=m.object_path, method_id=m.method_id,processing_node=None)
path = '/'.join(m.object_path)
uid_list = activity_tool.SQLDict_readUidList(path=path, method_id=m.method_id,processing_node=None)
uid_list = map(lambda x:x.uid, uid_list)
if len(uid_list)>0:
activity_tool.SQLDict_delMessage(uid = uid_list)
......
......@@ -67,8 +67,10 @@ class ActivityBuffer(TM):
try:
# Try to push / delete all messages
for (activity, activity_tool, message) in self.flushed_activity:
#LOG('ActivityBuffer finishDeleteMessage', ERROR, str(message.method_id))
activity.finishDeleteMessage(activity_tool, message)
for (activity, activity_tool, message) in self.queued_activity:
#LOG('ActivityBuffer finishQueueMessage', ERROR, str(message.method_id))
activity.finishQueueMessage(activity_tool, message)
except:
LOG('ActivityBuffer', ERROR, "exception during _finish",
......@@ -94,8 +96,10 @@ class ActivityBuffer(TM):
try:
# Try to push / delete all messages
for (activity, activity_tool, message) in self.flushed_activity:
#LOG('ActivityBuffer prepareDeleteMessage', ERROR, str(message.method_id))
activity.prepareDeleteMessage(activity_tool, message)
for (activity, activity_tool, message) in self.queued_activity:
#LOG('ActivityBuffer prepareQueueMessage', ERROR, str(message.method_id))
activity.prepareQueueMessage(activity_tool, message)
except:
LOG('ActivityBuffer', ERROR, "exception during tpc_prepare",
......
......@@ -318,6 +318,7 @@ class ActivityTool (Folder, UniqueObject):
return []
def unregisterMessage(self, activity, message):
self._v_activity_buffer._register() # Required if called by flush, outside activate
return activity.unregisterMessage(self._v_activity_buffer, self, message)
def flush(self, object, invoke=0, **kw):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment