Commit 53c7fc56 authored by Julien Muchembled's avatar Julien Muchembled

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.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32878 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent aa8516dd
...@@ -174,8 +174,8 @@ class SQLBase: ...@@ -174,8 +174,8 @@ class SQLBase:
notify_user_list.append(m) notify_user_list.append(m)
final_error_uid_list.append(uid) final_error_uid_list.append(uid)
continue continue
# XXX: What about making delay quadratic to the number of retries ? # By default, make delay quadratic to the number of retries.
delay = VALIDATION_ERROR_DELAY #* (retry * retry + 1) / 2 delay = VALIDATION_ERROR_DELAY * (retry * retry + 1) / 2
try: try:
# Immediately update, because values different for every message # Immediately update, because values different for every message
activity_tool.SQLBase_reactivate(table=self.sql_table, activity_tool.SQLBase_reactivate(table=self.sql_table,
......
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