Unlike the API or the WebSocket endpoints, the Python client requires passing the optional 'ttl' and 'grace' parameters due to a validation error in Zaqar.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/stack/python-zaqarclient/zaqarclient/queues/v1/queues.py", line 232, in claim
return claim_api.Claim(self, id=id, ttl=ttl, grace=grace, limit=limit)
File "/opt/stack/python-zaqarclient/zaqarclient/queues/v1/claim.py", line 32, in __init__
self._create()
File "/opt/stack/python-zaqarclient/zaqarclient/queues/v1/claim.py", line 61, in _create
limit=self._limit)
File "/opt/stack/python-zaqarclient/zaqarclient/queues/v1/core.py", line 365, in claim_create
resp = transport.send(request)
File "/opt/stack/python-zaqarclient/zaqarclient/transport/http.py", line 107, in send
raise self.http_to_zaqar[resp.status_code](msg)
zaqarclient.transport.errors.MalformedRequest: The TTL for a claim may not exceed 1209600 seconds, and must be at least 60 seconds long.
* Stack trace for missing 'grace' parameter *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/stack/python-zaqarclient/zaqarclient/queues/v1/queues.py", line 232, in claim
return claim_api.Claim(self, id=id, ttl=ttl, grace=grace, limit=limit)
File "/opt/stack/python-zaqarclient/zaqarclient/queues/v1/claim.py", line 32, in __init__
self._create()
File "/opt/stack/python-zaqarclient/zaqarclient/queues/v1/claim.py", line 61, in _create
limit=self._limit)
File "/opt/stack/python-zaqarclient/zaqarclient/queues/v1/core.py", line 365, in claim_create
resp = transport.send(request)
File "/opt/stack/python-zaqarclient/zaqarclient/transport/http.py", line 107, in send
raise self.http_to_zaqar[resp.status_code](msg)
zaqarclient.transport.errors.MalformedRequest: The grace for a claim may not exceed 43200 seconds, and must be at least 60 seconds long.
Please advise if the bug should be first reported against the Python client instead.
Unlike the API or the WebSocket endpoints, the Python client requires passing the optional 'ttl' and 'grace' parameters due to a validation error in Zaqar.
* Source Code *
from zaqarclient. queues. v1 import client
client = client.Client('http:// localhost: 8888', conf={' auth_opts' :{'options' :{'client_ uuid':. ..,'os_ auth_token' :...,'os_ auth_url' :'http:// localhost: 5000/v3. 0/','os_ project_ id':...}}}, version=1.1)
queue = client. queue(' SampleQueue' )
claim = queue.claim()
for msg in claim
print msg
* Stack trace for missing 'ttl' parameter *
Traceback (most recent call last): python- zaqarclient/ zaqarclient/ queues/ v1/queues. py", line 232, in claim Claim(self, id=id, ttl=ttl, grace=grace, limit=limit) python- zaqarclient/ zaqarclient/ queues/ v1/claim. py", line 32, in __init__ python- zaqarclient/ zaqarclient/ queues/ v1/claim. py", line 61, in _create self._limit) python- zaqarclient/ zaqarclient/ queues/ v1/core. py", line 365, in claim_create send(request) python- zaqarclient/ zaqarclient/ transport/ http.py" , line 107, in send to_zaqar[ resp.status_ code](msg) transport. errors. MalformedReques t: The TTL for a claim may not exceed 1209600 seconds, and must be at least 60 seconds long.
File "<stdin>", line 1, in <module>
File "/opt/stack/
return claim_api.
File "/opt/stack/
self._create()
File "/opt/stack/
limit=
File "/opt/stack/
resp = transport.
File "/opt/stack/
raise self.http_
zaqarclient.
* Stack trace for missing 'grace' parameter *
Traceback (most recent call last): python- zaqarclient/ zaqarclient/ queues/ v1/queues. py", line 232, in claim Claim(self, id=id, ttl=ttl, grace=grace, limit=limit) python- zaqarclient/ zaqarclient/ queues/ v1/claim. py", line 32, in __init__ python- zaqarclient/ zaqarclient/ queues/ v1/claim. py", line 61, in _create self._limit) python- zaqarclient/ zaqarclient/ queues/ v1/core. py", line 365, in claim_create send(request) python- zaqarclient/ zaqarclient/ transport/ http.py" , line 107, in send to_zaqar[ resp.status_ code](msg) transport. errors. MalformedReques t: The grace for a claim may not exceed 43200 seconds, and must be at least 60 seconds long.
File "<stdin>", line 1, in <module>
File "/opt/stack/
return claim_api.
File "/opt/stack/
self._create()
File "/opt/stack/
limit=
File "/opt/stack/
resp = transport.
File "/opt/stack/
raise self.http_
zaqarclient.
Please advise if the bug should be first reported against the Python client instead.