fix impl of set-queue-attrs
This commit is contained in:
parent
d421073b59
commit
a2e0919240
1 changed files with 7 additions and 3 deletions
|
|
@ -53,8 +53,11 @@
|
||||||
|
|
||||||
(defn queue-attrs
|
(defn queue-attrs
|
||||||
"Gets or sets the attributes of a queue specified by its URL string.
|
"Gets or sets the attributes of a queue specified by its URL string.
|
||||||
|
|
||||||
When setting attributes on a queue, the attribute map must have String keys
|
When setting attributes on a queue, the attribute map must have String keys
|
||||||
and values."
|
and values. Note that the SQS API only supports setting one queue attribute
|
||||||
|
per request, so each attribute name/value pair in the provided `attr-map`
|
||||||
|
will provoke a separate API request."
|
||||||
([^AmazonSQSClient client queue-url]
|
([^AmazonSQSClient client queue-url]
|
||||||
(->>
|
(->>
|
||||||
(.withAttributeNames (GetQueueAttributesRequest. queue-url) #{"All"})
|
(.withAttributeNames (GetQueueAttributesRequest. queue-url) #{"All"})
|
||||||
|
|
@ -62,8 +65,9 @@
|
||||||
.getAttributes
|
.getAttributes
|
||||||
(into {})))
|
(into {})))
|
||||||
([^AmazonSQSClient client queue-url attr-map]
|
([^AmazonSQSClient client queue-url attr-map]
|
||||||
(.setQueueAttributes client
|
(doseq [[k v] attr-map]
|
||||||
(SetQueueAttributesRequest. queue-url attr-map))))
|
(.setQueueAttributes client
|
||||||
|
(SetQueueAttributesRequest. queue-url {(str k) (str v)})))))
|
||||||
|
|
||||||
(defn send
|
(defn send
|
||||||
"Sends a new message with the given string body to the queue specified
|
"Sends a new message with the given string body to the queue specified
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue