1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/rackspace/requests/queues/update_claim.rb
2013-11-20 10:36:58 -06:00

26 lines
976 B
Ruby

module Fog
module Rackspace
class Queues
class Real
# This operation posts the specified message or messages.
# @note You can submit up to 10 messages in a single request.
#
# @param [String] queue_name Specifies the name of the queue.
# @param [Integer] ttl The ttl attribute specifies how long the server waits before releasing the claim. The ttl value must be between 60 and 43200 seconds (12 hours).
# @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/PATCH_updateClaim__version__queues__queue_name__claims__claimId__claims-operations-dle001.html
def update_claim(queue_name, claim_id, ttl)
body = {
:ttl => ttl
}
request(
:body => Fog::JSON.encode(body),
:expects => 204,
:method => 'PATCH',
:path => "queues/#{queue_name}/claims/#{claim_id}"
)
end
end
end
end
end