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
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
9ec2259e
Commit
9ec2259e
authored
Feb 02, 2018
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMFActivity: Take activity age in queue priority.
Just like age is taken into account inside each activity queue.
parent
24df3ec5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
product/CMFActivity/Activity/SQLBase.py
product/CMFActivity/Activity/SQLBase.py
+2
-2
product/CMFActivity/skins/activity/SQLBase_getPriority.zsql
product/CMFActivity/skins/activity/SQLBase_getPriority.zsql
+2
-2
No files found.
product/CMFActivity/Activity/SQLBase.py
View file @
9ec2259e
...
...
@@ -238,8 +238,8 @@ class SQLBase(Queue):
def
getPriority
(
self
,
activity_tool
):
result
=
activity_tool
.
SQLBase_getPriority
(
table
=
self
.
sql_table
)
if
result
:
assert
len
(
result
)
==
1
,
len
(
result
)
return
result
[
0
][
'priority
'
]
result
,
=
result
return
result
[
'priority'
],
result
[
'date
'
]
return
Queue
.
getPriority
(
self
,
activity_tool
)
def
_retryOnLockError
(
self
,
method
,
args
=
(),
kw
=
{}):
...
...
product/CMFActivity/skins/activity/SQLBase_getPriority.zsql
View file @
9ec2259e
...
...
@@ -9,10 +9,10 @@ class_file:
</dtml-comment>
<params>table
</params>
SELECT `priority` FROM
SELECT `priority`
, `date`
FROM
<dtml-var table>
WHERE
processing_node = 0
AND date <= UTC_TIMESTAMP()
ORDER BY priority
ORDER BY priority
, date
LIMIT 1
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