action_subscriber 5.1.2 → 5.1.3.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa5bf15c517485c9cccb0106e54b710a9ea27f531206b7f631c90b034214b45e
|
4
|
+
data.tar.gz: e1c884f440fa8fef25b63f04fa574e458ff60a2a0887b6fc2b1e44f96fb973e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8eff6bc852dbdbc1d96e0ef6894b8329a015542b7bb8764fba11d46c279c380c9eacf610de3e24a8729b38e8b8dba42b8d339eefad9f12dd5fad356596661dc6
|
7
|
+
data.tar.gz: 244a5f01766f1c3428a36a8f5cac737d4545d71f9202b92183ea7ccf39fac87cfdaea4499f9e59ef979f7627025402ded93885d015b82387226852104f1c3741
|
@@ -46,16 +46,25 @@ module ActionSubscriber
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def self.with_exchange(env, ttl, retry_queue_name)
|
49
|
-
|
50
|
-
|
49
|
+
unless env.channel.open?
|
50
|
+
begin
|
51
|
+
channel = RabbitConnection.with_connection{|connection| connection.create_channel}
|
52
|
+
channel.confirm_select
|
53
|
+
# an empty string is the default exchange [see bunny docs](http://rubybunny.info/articles/exchanges.html#default_exchange)
|
54
|
+
exchange = channel.topic("")
|
55
|
+
queue = channel.queue(retry_queue_name, :arguments => {"x-dead-letter-exchange" => "", "x-message-ttl" => ttl, "x-dead-letter-routing-key" => env.queue})
|
56
|
+
yield(exchange)
|
57
|
+
channel.wait_for_confirms
|
58
|
+
ensure
|
59
|
+
channel.close rescue nil
|
60
|
+
end
|
61
|
+
else
|
51
62
|
channel.confirm_select
|
52
63
|
# an empty string is the default exchange [see bunny docs](http://rubybunny.info/articles/exchanges.html#default_exchange)
|
53
64
|
exchange = channel.topic("")
|
54
65
|
queue = channel.queue(retry_queue_name, :arguments => {"x-dead-letter-exchange" => "", "x-message-ttl" => ttl, "x-dead-letter-routing-key" => env.queue})
|
55
66
|
yield(exchange)
|
56
67
|
channel.wait_for_confirms
|
57
|
-
ensure
|
58
|
-
channel.close rescue nil
|
59
68
|
end
|
60
69
|
end
|
61
70
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_subscriber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.
|
4
|
+
version: 5.1.3.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Stien
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2018-
|
15
|
+
date: 2018-11-06 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|
@@ -292,12 +292,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
292
292
|
version: '0'
|
293
293
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
294
294
|
requirements:
|
295
|
-
- - "
|
295
|
+
- - ">"
|
296
296
|
- !ruby/object:Gem::Version
|
297
|
-
version:
|
297
|
+
version: 1.3.1
|
298
298
|
requirements: []
|
299
299
|
rubyforge_project:
|
300
|
-
rubygems_version: 2.7.
|
300
|
+
rubygems_version: 2.7.7
|
301
301
|
signing_key:
|
302
302
|
specification_version: 4
|
303
303
|
summary: ActionSubscriber is a DSL that allows a rails app to consume messages from
|