Commit ab68991e authored by Vincent Pelletier's avatar Vincent Pelletier

Rename "limit" parameter to ZSQLMethods into "count", as it is a special...

Rename "limit" parameter to ZSQLMethods into "count", as it is a special parameter name (interpreted outside of ZSQLMethod).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25253 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8b4509ae
......@@ -161,10 +161,10 @@ class SQLDict(RAMDict, SQLBase):
This number is guaranted not to be exceeded.
If None (or not given) no limit apply.
"""
result = activity_tool.SQLDict_selectReservedMessageList(processing_node=processing_node, limit=limit)
result = activity_tool.SQLDict_selectReservedMessageList(processing_node=processing_node, count=limit)
if len(result) == 0:
activity_tool.SQLDict_reserveMessageList(limit=limit, processing_node=processing_node, to_date=date, **kw)
result = activity_tool.SQLDict_selectReservedMessageList(processing_node=processing_node, limit=limit)
activity_tool.SQLDict_reserveMessageList(count=limit, processing_node=processing_node, to_date=date, **kw)
result = activity_tool.SQLDict_selectReservedMessageList(processing_node=processing_node, count=limit)
return result
def makeMessageListAvailable(self, activity_tool, uid_list):
......
......@@ -110,10 +110,10 @@ class SQLQueue(RAMQueue, SQLBase):
This number is guaranted not to be exceeded.
If None (or not given) no limit apply.
"""
result = activity_tool.SQLQueue_selectReservedMessageList(processing_node=processing_node, limit=limit)
result = activity_tool.SQLQueue_selectReservedMessageList(processing_node=processing_node, count=limit)
if len(result) == 0:
activity_tool.SQLQueue_reserveMessageList(limit=limit, processing_node=processing_node, to_date=date)
result = activity_tool.SQLQueue_selectReservedMessageList(processing_node=processing_node, limit=limit)
activity_tool.SQLQueue_reserveMessageList(count=limit, processing_node=processing_node, to_date=date)
result = activity_tool.SQLQueue_selectReservedMessageList(processing_node=processing_node, count=limit)
return result
def makeMessageListAvailable(self, activity_tool, uid_list):
......@@ -482,7 +482,7 @@ class SQLQueue(RAMQueue, SQLBase):
now_date = self.getNow(activity_tool)
result = readMessageList(path=None, method_id=None, processing_node=-1,
to_date=now_date, include_processing=0,
offset=offset, limit=READ_MESSAGE_LIMIT)
offset=offset, count=READ_MESSAGE_LIMIT)
validated_count = 0
#TIME_begin = time()
while len(result) and validated_count < MAX_VALIDATED_LIMIT:
......@@ -503,7 +503,7 @@ class SQLQueue(RAMQueue, SQLBase):
offset += READ_MESSAGE_LIMIT
result = readMessageList(path=None, method_id=None, processing_node=-1,
to_date=now_date, include_processing=0,
offset=offset, limit=READ_MESSAGE_LIMIT)
offset=offset, count=READ_MESSAGE_LIMIT)
#TIME_end = time()
#LOG('SQLQueue.distribute', INFO, '%0.4fs : %i messages => %i distributables' % (TIME_end - TIME_begin, offset + len(result), validated_count))
......
......@@ -9,7 +9,7 @@ class_file:
</dtml-comment>
<params>processing_node
to_date
limit
count
group_method_id
order_validation_text</params>
UPDATE
......@@ -23,8 +23,8 @@ WHERE
<dtml-if order_validation_text> AND order_validation_text = <dtml-sqlvar order_validation_text type="string"> </dtml-if>
ORDER BY
priority, date, uid
<dtml-if limit>
LIMIT <dtml-sqlvar limit type="int">
<dtml-if count>
LIMIT <dtml-sqlvar count type="int">
</dtml-if>
<dtml-var sql_delimiter>
COMMIT
......@@ -8,7 +8,7 @@ class_name:
class_file:
</dtml-comment>
<params>processing_node
limit</params>
count</params>
SELECT
*
FROM
......@@ -16,6 +16,6 @@ FROM
WHERE
processing_node = <dtml-sqlvar processing_node type="int">
AND processing = 0
<dtml-if limit>
LIMIT <dtml-sqlvar limit type="int">
<dtml-if count>
LIMIT <dtml-sqlvar count type="int">
</dtml-if>
......@@ -9,7 +9,7 @@ class_file:
</dtml-comment>
<params>processing_node
to_date
limit
count
</params>
UPDATE
message_queue
......@@ -20,8 +20,8 @@ WHERE
AND date <= <dtml-sqlvar to_date type="datetime">
ORDER BY
priority, date, uid
<dtml-if limit>
LIMIT <dtml-sqlvar limit type="int">
<dtml-if count>
LIMIT <dtml-sqlvar count type="int">
</dtml-if>
<dtml-var sql_delimiter>
COMMIT
......@@ -8,7 +8,7 @@ class_name:
class_file:
</dtml-comment>
<params>processing_node
limit</params>
count</params>
SELECT
*
FROM
......@@ -16,6 +16,6 @@ FROM
WHERE
processing_node = <dtml-sqlvar processing_node type="int">
AND processing = 0
<dtml-if limit>
LIMIT <dtml-sqlvar limit type="int">
<dtml-if count>
LIMIT <dtml-sqlvar count type="int">
</dtml-if>
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