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
0
Issues
0
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
Klaus Wölfel
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):
...
@@ -238,8 +238,8 @@ class SQLBase(Queue):
def
getPriority
(
self
,
activity_tool
):
def
getPriority
(
self
,
activity_tool
):
result
=
activity_tool
.
SQLBase_getPriority
(
table
=
self
.
sql_table
)
result
=
activity_tool
.
SQLBase_getPriority
(
table
=
self
.
sql_table
)
if
result
:
if
result
:
assert
len
(
result
)
==
1
,
len
(
result
)
result
,
=
result
return
result
[
0
][
'priority
'
]
return
result
[
'priority'
],
result
[
'date
'
]
return
Queue
.
getPriority
(
self
,
activity_tool
)
return
Queue
.
getPriority
(
self
,
activity_tool
)
def
_retryOnLockError
(
self
,
method
,
args
=
(),
kw
=
{}):
def
_retryOnLockError
(
self
,
method
,
args
=
(),
kw
=
{}):
...
...
product/CMFActivity/skins/activity/SQLBase_getPriority.zsql
View file @
9ec2259e
...
@@ -9,10 +9,10 @@ class_file:
...
@@ -9,10 +9,10 @@ class_file:
</dtml-comment>
</dtml-comment>
<params>table
<params>table
</params>
</params>
SELECT `priority` FROM
SELECT `priority`
, `date`
FROM
<dtml-var table>
<dtml-var table>
WHERE
WHERE
processing_node = 0
processing_node = 0
AND date <= UTC_TIMESTAMP()
AND date <= UTC_TIMESTAMP()
ORDER BY priority
ORDER BY priority
, date
LIMIT 1
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