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:
return result[0][0]
def _getPriority(self, activity_tool, method, default):
now_date = self.getNow(activity_tool)
result = method(to_date=now_date)
result = method()
assert len(result) == 1
priority = result[0]['priority']
if priority is None:
......
......@@ -8,11 +8,10 @@ class_name:
class_file:
</dtml-comment>
<params>
to_date
</params>
SELECT MIN(`priority`) AS `priority` FROM
message
WHERE
processing_node = 0
AND date <= <dtml-sqlvar to_date type="datetime">
AND date <= UTC_TIMESTAMP()
......@@ -8,11 +8,10 @@ class_name:
class_file:
</dtml-comment>
<params>
to_date
</params>
SELECT MIN(`priority`) AS `priority` FROM
message_queue
WHERE
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