Commit a807d07f authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use prepareQueueMessageList if available.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2829 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c0885116
......@@ -100,8 +100,18 @@ class ActivityBuffer(TM):
for (activity, activity_tool, message) in self.flushed_activity:
#LOG('ActivityBuffer prepareDeleteMessage', ERROR, str(message.method_id))
activity.prepareDeleteMessage(activity_tool, message)
activity_dict = {}
for (activity, activity_tool, message) in self.queued_activity:
#LOG('ActivityBuffer prepareQueueMessage', ERROR, str(message.method_id))
key = (activity, activity_tool)
if key not in activity_dict:
activity_dict[key] = []
activity_dict[key].append(message)
for key, message_list in activity_dict.items():
activity, activity_tool = key
if hasattr(activity, 'prepareQueueMessageList'):
activity.prepareQueueMessageList(activity_tool, message_list)
else:
for message in message_list:
activity.prepareQueueMessage(activity_tool, message)
except:
LOG('ActivityBuffer', ERROR, "exception during tpc_prepare",
......
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