fix: rename _payload_uplimit into _paging_uplimit

Although "message_paging_uplimit" also limit the maximum number of
IDs can be supplied in a URI, which is not quite a "page" (in bulk
deletion), but we don't need the configuration to be too precise.

Change-Id: I0737146f1212c82db18de35e35206d3932a46628
This commit is contained in:
Zhihao Yuan 2013-08-13 18:16:51 -04:00
parent 5e9f60da85
commit fff83ba634
2 changed files with 10 additions and 10 deletions

View File

@ -70,11 +70,11 @@ database = marconi
[limits:transport]
# The maximum number of queue records per page when listing queues
;queue_payload_uplimit = 20
;queue_paging_uplimit = 20
# The maximum number of messages in a message posting, maximum
# number of messages per page when listing or claiming messages,
# and maximum number of messages involved in a bulk operation.
;message_payload_uplimit = 20
;message_paging_uplimit = 20
# Expiration limits; the minimal values are all 60 (seconds)
;message_ttl_max = 1209600
;claim_ttl_max = 43200

View File

@ -21,9 +21,9 @@ from marconi.common import config
from marconi.common import exceptions
OPTIONS = {
'queue_payload_uplimit': 20,
'queue_paging_uplimit': 20,
'metadata_size_uplimit': 64 * 1024,
'message_payload_uplimit': 20,
'message_paging_uplimit': 20,
'message_size_uplimit': 256 * 1024,
'message_ttl_max': 1209600,
'claim_ttl_max': 43200,
@ -61,10 +61,10 @@ def queue_listing(limit=None, **kwargs):
:raises: ValidationFailed if the limit is exceeded
"""
if limit is not None and not (0 < limit <= CFG.queue_payload_uplimit):
if limit is not None and not (0 < limit <= CFG.queue_paging_uplimit):
raise exceptions.ValidationFailed(
'queue payload count not in (0, %d]' %
CFG.queue_payload_uplimit)
'queue paging count not in (0, %d]' %
CFG.queue_paging_uplimit)
def queue_content(metadata, check_size):
@ -123,10 +123,10 @@ def message_listing(limit=None, **kwargs):
:raises: ValidationFailed if the limit is exceeded
"""
if limit is not None and not (0 < limit <= CFG.message_payload_uplimit):
if limit is not None and not (0 < limit <= CFG.message_paging_uplimit):
raise exceptions.ValidationFailed(
'message payload count not in (0, %d]' %
CFG.message_payload_uplimit)
'message paging count not in (0, %d]' %
CFG.message_paging_uplimit)
def claim_creation(metadata, **kwargs):