[Erp5-report] r19087 - /erp5/trunk/products/CMFActivity/Activity/SQLDict.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Feb 5 22:37:07 CET 2008
Author: vincent
Date: Tue Feb 5 22:37:06 2008
New Revision: 19087
URL: http://svn.erp5.org?rev=19087&view=rev
Log:
Same fixes as commits 19076 and 19077 on SQLQueue.
Modified:
erp5/trunk/products/CMFActivity/Activity/SQLDict.py
Modified: erp5/trunk/products/CMFActivity/Activity/SQLDict.py
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/Activity/SQLDict.py?rev=19087&r1=19086&r2=19087&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/Activity/SQLDict.py (original)
+++ erp5/trunk/products/CMFActivity/Activity/SQLDict.py Tue Feb 5 22:37:06 2008
@@ -411,20 +411,6 @@
method(*args)
except:
LOG('SQLDict', WARNING, 'Exception raised when invoking messages (uid, path, method_id) %r' % ([(x[0], x[1].object_path, x[1].method_id) for x in message_uid_priority_list], ), error=sys.exc_info())
- to_free_uid_list = [x[0] for x in message_uid_priority_list]
- try:
- # Rollback all changes made on activity connection.
- # We will commit to make messages available, and we cannot control
- # what was done by the activity: it might have used the activity
- # connection. As the transaction failed, we must rollback these
- # potential changes before being allowed to commit in
- # makeMessageListAvailable.
- activity_tool.SQLDict_rollback()
- makeMessageListAvailable(to_free_uid_list)
- except:
- LOG('SQLDict', PANIC, 'Failed to free messages: %r' % (to_free_uid_list, ), error=sys.exc_info())
- else:
- LOG('SQLDict', TRACE, 'Freed messages %r' % (to_free_uid_list))
try:
abortTransactionSynchronously()
except:
@@ -432,6 +418,13 @@
LOG('SQLDict', PANIC,
'abort failed, thus some objects may be modified accidentally')
return True # Stop processing messages for this tic call for this queue.
+ to_free_uid_list = [x[0] for x in message_uid_priority_list]
+ try:
+ makeMessageListAvailable(to_free_uid_list)
+ except:
+ LOG('SQLDict', PANIC, 'Failed to free messages: %r' % (to_free_uid_list, ), error=sys.exc_info())
+ else:
+ LOG('SQLDict', TRACE, 'Freed messages %r' % (to_free_uid_list))
# Abort if something failed.
if len([x for x in message_uid_priority_list if not x[1].is_executed]) != 0:
endTransaction = abortTransactionSynchronously
More information about the Erp5-report
mailing list