[Erp5-report] r32878 jm - /erp5/trunk/products/CMFActivity/Activity/SQLBase.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Feb 19 18:56:08 CET 2010


Author: jm
Date: Fri Feb 19 18:56:08 2010
New Revision: 32878

URL: http://svn.erp5.org?rev=32878&view=rev
Log:
Make delay quadratic to the number of retries (instead of 30 seconds)

 retry |  now
 ------+------
   0   |    15
   1   |    30
   2   |  1:15
   3   |  2:30
   4   |  4:15
   5   |  6:30
   6   |  9:15
   7   | 12:30
   8   | 16:15
   9   | 20:30
  ...  |  ...

For ConflictError, delay is still constant to 30 seconds.

Modified:
    erp5/trunk/products/CMFActivity/Activity/SQLBase.py

Modified: erp5/trunk/products/CMFActivity/Activity/SQLBase.py
URL: http://svn.erp5.org/erp5/trunk/products/CMFActivity/Activity/SQLBase.py?rev=32878&r1=32877&r2=32878&view=diff
==============================================================================
--- erp5/trunk/products/CMFActivity/Activity/SQLBase.py [utf8] (original)
+++ erp5/trunk/products/CMFActivity/Activity/SQLBase.py [utf8] Fri Feb 19 18:56:08 2010
@@ -174,8 +174,8 @@
             notify_user_list.append(m)
             final_error_uid_list.append(uid)
             continue
-          # XXX: What about making delay quadratic to the number of retries ?
-          delay = VALIDATION_ERROR_DELAY #* (retry * retry + 1) / 2
+          # By default, make delay quadratic to the number of retries.
+          delay = VALIDATION_ERROR_DELAY * (retry * retry + 1) / 2
           try:
             # Immediately update, because values different for every message
             activity_tool.SQLBase_reactivate(table=self.sql_table,




More information about the Erp5-report mailing list