awful 0.0.115 → 0.0.116
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/awful/sqs.rb +10 -2
- data/lib/awful/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b636b887fb7b3d4b6bcbbd3232b24959c95aa53e
|
4
|
+
data.tar.gz: 135f6a35f7ce58c35477cfdec3f279442bc8084a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 082f585bd4c48bcb73a54fe386af7aca6563a28c4e5a68d6c2db7a268baa61814237c4a36cc760aa8777ec8d4f683396dab377c8deafc1b310ccd842349c30b8
|
7
|
+
data.tar.gz: 3c7ab2ba1e137eca5fabdb52b0e1f4d7a05edb069bbe0a5884f860c3ba87ecd74258669e9b68e23b26fd8251145880495f61975d47f6774d5c2f83d26ad8dc42
|
data/lib/awful/sqs.rb
CHANGED
@@ -71,8 +71,16 @@ module Awful
|
|
71
71
|
end
|
72
72
|
|
73
73
|
desc 'send NAME_OR_URL MSG', 'send message to queue'
|
74
|
-
def send(name,
|
75
|
-
sqs.send_message(queue_url: queue_url(name), message_body:
|
74
|
+
def send(name, message)
|
75
|
+
sqs.send_message(queue_url: queue_url(name), message_body: message)
|
76
|
+
end
|
77
|
+
|
78
|
+
desc 'send_batch NAME_OR_URL MSGS', 'send a batch of up to 10 messages to queue'
|
79
|
+
def send_batch(name, *messages)
|
80
|
+
entries = messages.map.with_index do |m, i|
|
81
|
+
{id: i.to_s, message_body: m}
|
82
|
+
end
|
83
|
+
sqs.send_message_batch(queue_url: queue_url(name), entries: entries)
|
76
84
|
end
|
77
85
|
|
78
86
|
desc 'receive NAME_OR_URL', 'receive message from queue'
|
data/lib/awful/version.rb
CHANGED