Commit 3cc2916b authored by Jean-Paul Smets's avatar Jean-Paul Smets

bugfixed


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@682 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d867ec19
...@@ -82,9 +82,11 @@ class Queue: ...@@ -82,9 +82,11 @@ class Queue:
activity_tool.deferredQueueMessage(self, m) activity_tool.deferredQueueMessage(self, m)
def deleteMessage(self, activity_tool, m): def deleteMessage(self, activity_tool, m):
if not self.isMessageDeleted(activity_tool, m): if not getattr(m, 'is_deleted', 0):
# We try not to delete twice
# However this can not be garanteed in the case of messages loaded from SQL
activity_tool.deferredDeleteMessage(self, m) activity_tool.deferredDeleteMessage(self, m)
# We must never deleted twice m.is_deleted = 1
def dequeueMessage(self, activity_tool, processing_node): def dequeueMessage(self, activity_tool, processing_node):
pass pass
......
...@@ -79,7 +79,7 @@ class RAMQueue(Queue): ...@@ -79,7 +79,7 @@ class RAMQueue(Queue):
for m in self.queue: for m in self.queue:
if object_path == m.object_path and (method_id is None or method_id == m.method_id): if object_path == m.object_path and (method_id is None or method_id == m.method_id):
if invoke: activity_tool.invoke(m) if invoke: activity_tool.invoke(m)
self.deleteMessage(m) self.deleteMessage(activity_tool, m)
def getMessageList(self, activity_tool, processing_node=None): def getMessageList(self, activity_tool, processing_node=None):
new_queue = [] new_queue = []
......
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