[Erp5-report] r22773 - /erp5/trunk/products/CMFActivity/Activity/SQLQueue.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jul 31 09:43:09 CEST 2008
Author: yo
Date: Thu Jul 31 09:43:09 2008
New Revision: 22773
URL: http://svn.erp5.org?rev=22773&view=rev
Log:
The right fix for checking processing state in flush.
Modified:
erp5/trunk/products/CMFActivity/Activity/SQLQueue.py
Modified: erp5/trunk/products/CMFActivity/Activity/SQLQueue.py
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/Activity/SQLQueue.py?rev=22773&r1=22772&r2=22773&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/Activity/SQLQueue.py (original)
+++ erp5/trunk/products/CMFActivity/Activity/SQLQueue.py Thu Jul 31 09:43:09 2008
@@ -376,11 +376,8 @@
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 invoke:
- # First Validate (only if message is marked as new)
- if line.processing_node == -1:
- validate_value = m.validate(self, activity_tool)
- else:
- validate_value = VALID
+ # First Validate
+ validate_value = m.validate(self, activity_tool)
if validate_value is VALID:
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
@@ -402,8 +399,11 @@
method_id = line.method_id
m = self.loadMessage(line.message, uid = line.uid)
if invoke:
- # First Validate
- validate_value = m.validate(self, activity_tool)
+ # First Validate (only if message is marked as new)
+ if line.processing_node == -1:
+ validate_value = m.validate(self, activity_tool)
+ else:
+ validate_value = VALID
if validate_value is VALID:
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
More information about the Erp5-report
mailing list