Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roque
erp5
Commits
283b08de
Commit
283b08de
authored
Nov 27, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMFActivity: fix notification of failing messages with infinite retry
parent
32bd1215
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
product/CMFActivity/Activity/SQLBase.py
product/CMFActivity/Activity/SQLBase.py
+2
-2
product/CMFActivity/ActivityRuntimeEnvironment.py
product/CMFActivity/ActivityRuntimeEnvironment.py
+3
-1
No files found.
product/CMFActivity/Activity/SQLBase.py
View file @
283b08de
...
...
@@ -36,7 +36,7 @@ from Products.CMFActivity.ActivityTool import (
Message
,
MESSAGE_NOT_EXECUTED
,
MESSAGE_EXECUTED
)
from
Products.CMFActivity.ActiveObject
import
INVOKE_ERROR_STATE
from
Products.CMFActivity.ActivityRuntimeEnvironment
import
(
ActivityRuntimeEnvironment
,
getTransactionalVariable
)
DEFAULT_MAX_RETRY
,
ActivityRuntimeEnvironment
,
getTransactionalVariable
)
from
Queue
import
Queue
,
VALIDATION_ERROR_DELAY
,
VALID
,
INVALID_PATH
from
Products.CMFActivity.Errors
import
ActivityFlushError
...
...
@@ -460,7 +460,7 @@ class SQLBase(Queue):
continue
# In case of infinite retry, notify the user
# when the default limit is reached.
if
max_retry
is
None
and
retry
==
m
.
__class__
.
max_retry
:
if
max_retry
is
None
and
retry
==
DEFAULT_MAX_RETRY
:
notify_user_list
.
append
((
m
,
True
))
delay
=
m
.
delay
if
delay
is
None
:
...
...
product/CMFActivity/ActivityRuntimeEnvironment.py
View file @
283b08de
...
...
@@ -2,6 +2,8 @@ from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type.Globals
import
InitializeClass
DEFAULT_MAX_RETRY
=
3
def
getActivityRuntimeEnvironment
():
"""
Raises KeyError if called outside activity.
...
...
@@ -23,7 +25,7 @@ class BaseMessage:
delay
=
__property
(
delay
=
None
)
# None means infinite retry
max_retry
=
__property
(
max_retry
=
3
)
max_retry
=
__property
(
max_retry
=
DEFAULT_MAX_RETRY
)
# For errors happening after message invocation (ConflictError),
# should we retry quickly without increasing 'retry' count ?
conflict_retry
=
__property
(
conflict_retry
=
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment