[Erp5-report] r27332 - in /erp5/trunk/products/CMFActivity/Activity: SQLDict.py SQLQueue.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jun 2 13:57:57 CEST 2009


Author: jm
Date: Tue Jun  2 13:57:57 2009
New Revision: 27332

URL: http://svn.erp5.org?rev=27332&view=rev
Log:
Do not notify if an active process finishes. This never worked before r27329 and it is now redundant with alarm notification.

Modified:
    erp5/trunk/products/CMFActivity/Activity/SQLDict.py
    erp5/trunk/products/CMFActivity/Activity/SQLQueue.py

Modified: erp5/trunk/products/CMFActivity/Activity/SQLDict.py
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/Activity/SQLDict.py?rev=27332&r1=27331&r2=27332&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/Activity/SQLDict.py [utf8] (original)
+++ erp5/trunk/products/CMFActivity/Activity/SQLDict.py [utf8] Tue Jun  2 13:57:57 2009
@@ -338,7 +338,6 @@
     delay_uid_list = []
     final_error_uid_list = []
     make_available_uid_list = []
-    message_with_active_process_list = []
     notify_user_list = []
     non_executable_message_list = []
     something_failed = (len([x for x in message_uid_priority_list if x[1].getExecutionState() == MESSAGE_NOT_EXECUTED]) != 0)
@@ -350,10 +349,6 @@
         else:
           deletable_uid_list.append(uid)
           deletable_uid_list.extend(uid_to_duplicate_uid_list_dict.get(uid, []))
-          if m.active_process:
-            # XXX: Bug here: Even if a duplicate message has an active_process,
-            # it won't be called on the duplicate.
-            message_with_active_process_list.append(m)
       elif m.getExecutionState() == MESSAGE_NOT_EXECUTED:
         # Should duplicate messages follow strictly the original message, or
         # should they be just made available again ?
@@ -415,11 +410,6 @@
     try:
       for m in notify_user_list:
         m.notifyUser(activity_tool)
-      for m in message_with_active_process_list:
-        active_process = activity_tool.unrestrictedTraverse(m.active_process)
-        if not active_process.hasActivity():
-          # No more activity
-          m.notifyUser(activity_tool, message="Process Finished") # XXX commit bas ???
     except:
       # Notification failures must not cause this method to raise.
       LOG('SQLDict', WARNING, 'Exception during notification phase of finalizeMessageExecution', error=sys.exc_info())

Modified: erp5/trunk/products/CMFActivity/Activity/SQLQueue.py
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/Activity/SQLQueue.py?rev=27332&r1=27331&r2=27332&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/Activity/SQLQueue.py [utf8] (original)
+++ erp5/trunk/products/CMFActivity/Activity/SQLQueue.py [utf8] Tue Jun  2 13:57:57 2009
@@ -208,14 +208,11 @@
     deletable_uid_list = []
     delay_uid_list = []
     final_error_uid_list = []
-    message_with_active_process_list = []
     notify_user_list = []
     non_executable_message_list = []
     for uid, m, priority in message_uid_priority_list:
       if m.getExecutionState() == MESSAGE_EXECUTED:
         deletable_uid_list.append(uid)
-        if m.active_process:
-          message_with_active_process_list.append(m)
       elif m.getExecutionState() == MESSAGE_NOT_EXECUTED:
         if type(m.exc_type) is ClassType and \
            issubclass(m.exc_type, ConflictError):
@@ -277,11 +274,6 @@
     try:
       for m in notify_user_list:
         m.notifyUser(activity_tool)
-      for m in message_with_active_process_list:
-        active_process = activity_tool.unrestrictedTraverse(m.active_process)
-        if not active_process.hasActivity():
-          # No more activity
-          m.notifyUser(activity_tool, message="Process Finished") # XXX commit bas ???
     except:
       # Notification failures must not cause this method to raise.
       LOG('SQLQueue', WARNING, 'Exception during notification phase of finalizeMessageExecution', error=sys.exc_info())




More information about the Erp5-report mailing list