Commit 2c4dcc73 authored by Yoshinori Okuji's avatar Yoshinori Okuji

The right fix for checking processing state in flush.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22773 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f95d0c35
...@@ -376,11 +376,8 @@ class SQLQueue(RAMQueue, SQLBase): ...@@ -376,11 +376,8 @@ class SQLQueue(RAMQueue, SQLBase):
for m in activity_tool.getRegisteredMessageList(self): for m in activity_tool.getRegisteredMessageList(self):
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: if invoke:
# First Validate (only if message is marked as new) # First Validate
if line.processing_node == -1: validate_value = m.validate(self, activity_tool)
validate_value = m.validate(self, activity_tool)
else:
validate_value = VALID
if validate_value is VALID: if validate_value is VALID:
activity_tool.invoke(m) # Try to invoke the message - what happens if invoke calls flushActivity ?? activity_tool.invoke(m) # Try to invoke the message - what happens if invoke calls flushActivity ??
if m.is_executed != MESSAGE_EXECUTED: # Make sure message could be invoked if m.is_executed != MESSAGE_EXECUTED: # Make sure message could be invoked
...@@ -402,8 +399,11 @@ class SQLQueue(RAMQueue, SQLBase): ...@@ -402,8 +399,11 @@ class SQLQueue(RAMQueue, SQLBase):
method_id = line.method_id method_id = line.method_id
m = self.loadMessage(line.message, uid = line.uid) m = self.loadMessage(line.message, uid = line.uid)
if invoke: if invoke:
# First Validate # First Validate (only if message is marked as new)
validate_value = m.validate(self, activity_tool) if line.processing_node == -1:
validate_value = m.validate(self, activity_tool)
else:
validate_value = VALID
if validate_value is VALID: if validate_value is VALID:
activity_tool.invoke(m) # Try to invoke the message - what happens if invoke calls flushActivity ?? activity_tool.invoke(m) # Try to invoke the message - what happens if invoke calls flushActivity ??
if m.is_executed != MESSAGE_EXECUTED: # Make sure message could be invoked if m.is_executed != MESSAGE_EXECUTED: # Make sure message could be invoked
......
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