carnivore-sqs 0.1.18 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/carnivore-sqs/sqs.rb +8 -5
- data/lib/carnivore-sqs/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5248710788853a993a5362663b76f455446ebfc4
|
4
|
+
data.tar.gz: eada6f4134284fd37354c88e3edd8d21b8767310
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb13cd455dcacd116ac90de840f4e9585fbf71e353f146b5b8509965db9842cb72122c73bca78f23fd23c0871ad51e6c5f6178980b465e9cd634d82ef6aaad3e
|
7
|
+
data.tar.gz: 7f7a23a5f6748bcac498e259f09c8edef3fdcfec6b57627b63b389cb0d60b60b94333645879be46b30831dc5c3fb29f6e852bcc8e549f05cbde040bf579270d4
|
data/CHANGELOG.md
CHANGED
data/lib/carnivore-sqs/sqs.rb
CHANGED
@@ -60,7 +60,7 @@ module Carnivore
|
|
60
60
|
begin
|
61
61
|
defer do
|
62
62
|
Timeout.timeout(args.fetch(:receive_timeout, 30).to_i) do
|
63
|
-
m = @fog.receive_message(q, 'MaxNumberOfMessages' => n).body['Message']
|
63
|
+
m = @fog.receive_message(q, 'MaxNumberOfMessages' => n, 'WaitTimeSeconds' => 25).body['Message']
|
64
64
|
m.map{|mg| mg.merge('SourceQueue' => q)}
|
65
65
|
end
|
66
66
|
end
|
@@ -167,15 +167,18 @@ module Carnivore
|
|
167
167
|
@fog
|
168
168
|
end
|
169
169
|
|
170
|
-
def pre_process(
|
171
|
-
if(
|
170
|
+
def pre_process(msg)
|
171
|
+
if(msg['Body'])
|
172
172
|
begin
|
173
|
-
|
173
|
+
msg['Body'] = JSON.load(msg['Body'])
|
174
174
|
rescue JSON::ParserError
|
175
175
|
# well, we did our best
|
176
176
|
end
|
177
177
|
end
|
178
|
-
|
178
|
+
Smash.new(
|
179
|
+
:raw => msg,
|
180
|
+
:content => msg['Body']
|
181
|
+
)
|
179
182
|
end
|
180
183
|
|
181
184
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carnivore-sqs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: carnivore
|
@@ -77,3 +77,4 @@ signing_key:
|
|
77
77
|
specification_version: 4
|
78
78
|
summary: Message processing helper
|
79
79
|
test_files: []
|
80
|
+
has_rdoc:
|