carnivore-sqs 0.1.16 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 303ae1f0c32dbec6454a677df5c9a3fdb8aba2dc
4
- data.tar.gz: 6b00b0ca98e28b635387649439b863c5057f2b89
3
+ metadata.gz: d03bec1dc796d3151a6b9452edab2f389f19d26b
4
+ data.tar.gz: 48a99739e89943ffba0f7c514d6279593d67d460
5
5
  SHA512:
6
- metadata.gz: bc2642e826f04813de785bf3e7e1f2f0cd4eb13dbfa3ddf3fa342ea0661c0b73891d6e56ecfb12ef2e5eaed175cbb040411cd407e9e16efe0986552aa7874928
7
- data.tar.gz: e4d4935592aadd0e85c97df30faaa5d09927876a846ca34d7a8564664a9598899b0f269865bbd314b59e22157ffa6f8d018b363ae97fa47760285ad642104224
6
+ metadata.gz: f4a0aef3ffe45ef357c70634b70ced5c4bfbe2e62baa3beec1e7507c4d9e4634cfb040d753d425155d16d7217390346c79ba94084b66fe0755cad84e6ca24edf
7
+ data.tar.gz: 2612d55dee5e24c9fce0e8e84661c1a927ff68c3c87de4bd1ea622356598e62f02dca431182aaa163c4ceff0c91b370f3f0cdba80c79e91d84eca6b093ee8a8e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # v0.1.18
2
+ * Defer on remote API calls to prevent internal blocking
3
+
1
4
  # v0.1.16
2
5
  * Fix iteration type used for hash generation
3
6
 
@@ -58,9 +58,11 @@ module Carnivore
58
58
  msgs = []
59
59
  msgs = queues.map do |q|
60
60
  begin
61
- Timeout.timeout(args.fetch(:receive_timeout, 30).to_i) do
62
- m = @fog.receive_message(q, 'MaxNumberOfMessages' => n).body['Message']
63
- m.map{|mg| mg.merge('SourceQueue' => q)}
61
+ defer do
62
+ Timeout.timeout(args.fetch(:receive_timeout, 30).to_i) do
63
+ m = @fog.receive_message(q, 'MaxNumberOfMessages' => n).body['Message']
64
+ m.map{|mg| mg.merge('SourceQueue' => q)}
65
+ end
64
66
  end
65
67
  rescue Timeout::Error
66
68
  error 'Receive timeout encountered. Triggering a reconnection.'
@@ -92,7 +94,7 @@ module Carnivore
92
94
  begin
93
95
  queue = determine_queue(original)
94
96
  message = JSON.dump(message) unless message.is_a?(String)
95
- @fog.send_message(queue, message)
97
+ defer{ @fog.send_message(queue, message) }
96
98
  rescue Excon::Errors::Error => e
97
99
  error "SQS transmission received an unexpected error. Pausing and running retry (#{e.class}: #{e})"
98
100
  debug "SQS ERROR TRACE: #{e.class}: #{e}\n#{e.backtrace.join("\n")}"
@@ -1,5 +1,5 @@
1
1
  module Carnivore
2
2
  module Sqs
3
- VERSION = Gem::Version.new('0.1.16')
3
+ VERSION = Gem::Version.new('0.1.18')
4
4
  end
5
5
  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.16
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-16 00:00:00.000000000 Z
11
+ date: 2015-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carnivore
@@ -48,8 +48,6 @@ files:
48
48
  - CONTRIBUTING.md
49
49
  - LICENSE
50
50
  - README.md
51
- - carnivore-sqs-0.1.12.gem
52
- - carnivore-sqs-0.1.14.gem
53
51
  - carnivore-sqs.gemspec
54
52
  - lib/carnivore-sqs.rb
55
53
  - lib/carnivore-sqs/sqs.rb
@@ -74,9 +72,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
72
  version: '0'
75
73
  requirements: []
76
74
  rubyforge_project:
77
- rubygems_version: 2.2.2
75
+ rubygems_version: 2.4.8
78
76
  signing_key:
79
77
  specification_version: 4
80
78
  summary: Message processing helper
81
79
  test_files: []
82
- has_rdoc:
Binary file
Binary file