sneakers 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sneakers/handlers/maxretry.rb +12 -3
- data/lib/sneakers/version.rb +1 -1
- data/spec/sneakers/worker_handlers_spec.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 733fe6cd472f61a3055431c5d17d1ca8ff14690a
|
4
|
+
data.tar.gz: 523562a5e31f948814c2384a91151a2cd2df7a0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07fbd52feddac85c3e29d6435b139d9e89d2853694e623dabe36a330dfbd082a2e219d3ce906d21038f1af37891d92012b95f7a0e6bc8fc30e9a88c5650babae
|
7
|
+
data.tar.gz: ca949d95e442ef2b6f89f9c4506eceeaade78a5f9bcb1d1700a60419891bd34fe1ec66c8c1283cc7077302a8046cccf5df8580cfea207da22a1e4ea03d572fef
|
@@ -52,7 +52,7 @@ module Sneakers
|
|
52
52
|
Sneakers.logger.debug { "#{log_prefix} creating exchange=#{name}" }
|
53
53
|
@channel.exchange(name,
|
54
54
|
:type => 'topic',
|
55
|
-
:durable =>
|
55
|
+
:durable => exchange_durable?)
|
56
56
|
end
|
57
57
|
|
58
58
|
# Create the queues and bindings
|
@@ -60,7 +60,7 @@ module Sneakers
|
|
60
60
|
"#{log_prefix} creating queue=#{retry_name} x-dead-letter-exchange=#{requeue_name}"
|
61
61
|
end
|
62
62
|
@retry_queue = @channel.queue(retry_name,
|
63
|
-
:durable =>
|
63
|
+
:durable => queue_durable?,
|
64
64
|
:arguments => {
|
65
65
|
:'x-dead-letter-exchange' => requeue_name,
|
66
66
|
:'x-message-ttl' => @opts[:retry_timeout] || 60000
|
@@ -71,7 +71,7 @@ module Sneakers
|
|
71
71
|
"#{log_prefix} creating queue=#{error_name}"
|
72
72
|
end
|
73
73
|
@error_queue = @channel.queue(error_name,
|
74
|
-
:durable =>
|
74
|
+
:durable => queue_durable?)
|
75
75
|
@error_queue.bind(@error_exchange, :routing_key => '#')
|
76
76
|
|
77
77
|
# Finally, bind the worker queue to our requeue exchange
|
@@ -186,6 +186,15 @@ module Sneakers
|
|
186
186
|
end
|
187
187
|
private :log_prefix
|
188
188
|
|
189
|
+
private
|
190
|
+
|
191
|
+
def queue_durable?
|
192
|
+
@opts.fetch(:queue_options, {}).fetch(:durable, false)
|
193
|
+
end
|
194
|
+
|
195
|
+
def exchange_durable?
|
196
|
+
queue_durable?
|
197
|
+
end
|
189
198
|
end
|
190
199
|
end
|
191
200
|
end
|
data/lib/sneakers/version.rb
CHANGED
@@ -132,7 +132,9 @@ describe 'Handlers' do
|
|
132
132
|
before(:each) do
|
133
133
|
@opts = {
|
134
134
|
:exchange => 'sneakers',
|
135
|
-
:
|
135
|
+
:queue_options => {
|
136
|
+
:durable => 'true',
|
137
|
+
}
|
136
138
|
}.tap do |opts|
|
137
139
|
opts[:retry_max_times] = max_retries unless max_retries.nil?
|
138
140
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sneakers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dotan Nahum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: serverengine
|