Commit dc036ee0 authored by Vincent Pelletier's avatar Vincent Pelletier

Compute boundary date inside priority-computing ZSQLMethods instead of using a separate one.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19425 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent adfef3b3
...@@ -43,8 +43,7 @@ class SQLBase: ...@@ -43,8 +43,7 @@ class SQLBase:
return result[0][0] return result[0][0]
def _getPriority(self, activity_tool, method, default): def _getPriority(self, activity_tool, method, default):
now_date = self.getNow(activity_tool) result = method()
result = method(to_date=now_date)
assert len(result) == 1 assert len(result) == 1
priority = result[0]['priority'] priority = result[0]['priority']
if priority is None: if priority is None:
......
...@@ -8,11 +8,10 @@ class_name: ...@@ -8,11 +8,10 @@ class_name:
class_file: class_file:
</dtml-comment> </dtml-comment>
<params> <params>
to_date
</params> </params>
SELECT MIN(`priority`) AS `priority` FROM SELECT MIN(`priority`) AS `priority` FROM
message message
WHERE WHERE
processing_node = 0 processing_node = 0
AND date <= <dtml-sqlvar to_date type="datetime"> AND date <= UTC_TIMESTAMP()
...@@ -8,11 +8,10 @@ class_name: ...@@ -8,11 +8,10 @@ class_name:
class_file: class_file:
</dtml-comment> </dtml-comment>
<params> <params>
to_date
</params> </params>
SELECT MIN(`priority`) AS `priority` FROM SELECT MIN(`priority`) AS `priority` FROM
message_queue message_queue
WHERE WHERE
processing_node = 0 processing_node = 0
AND date <= <dtml-sqlvar to_date type="datetime"> AND date <= UTC_TIMESTAMP()
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