Commit 514df2d6 authored by Yoshinori Okuji's avatar Yoshinori Okuji

For INVALID_ORDER, it is a bad idea to specify processing_node, because...

For INVALID_ORDER, it is a bad idea to specify processing_node, because processMessage may set processing to 1, even if messages are not assigned to a given node. Thus simply specify the uid list instead.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13951 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cff90edc
......@@ -167,11 +167,13 @@ class SQLDict(RAMDict):
if priority > MAX_PRIORITY:
# This is an error
if len(uid_list) > 0:
#LOG('SQLDict', 0, 'error uid_list = %r' % (uid_list,))
activity_tool.SQLDict_assignMessage(uid = uid_list, processing_node = VALIDATE_ERROR_STATE)
# Assign message back to 'error' state
#m.notifyUser(activity_tool) # Notify Error
get_transaction().commit() # and commit
else:
#LOG('SQLDict', 0, 'lower priority uid_list = %r' % (uid_list,))
# Lower priority
if len(uid_list) > 0: # Add some delay before new processing
activity_tool.SQLDict_setPriority(uid = uid_list, delay = VALIDATION_ERROR_DELAY,
......@@ -179,12 +181,10 @@ class SQLDict(RAMDict):
get_transaction().commit() # Release locks before starting a potentially long calculation
else:
# We do not lower priority for INVALID_ORDER errors but we do postpone execution
order_validation_text = self.getOrderValidationText(message)
activity_tool.SQLDict_setPriority(order_validation_text = order_validation_text,
processing_node = processing_node,
#order_validation_text = self.getOrderValidationText(message)
activity_tool.SQLDict_setPriority(uid = uid_list,
delay = VALIDATION_ERROR_DELAY,
retry = 1,
uid = None)
retry = 1)
get_transaction().commit() # Release locks before starting a potentially long calculation
return 0
return 1
......
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