bunny 2.6.0 → 2.6.1
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 +4 -4
- data/ChangeLog.md +13 -1
- data/lib/bunny/channel.rb +3 -1
- data/lib/bunny/consumer_work_pool.rb +2 -1
- data/lib/bunny/version.rb +1 -1
- data/spec/higher_level_api/integration/basic_cancel_spec.rb +6 -2
- 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: d39fdfc39df5c5c84ef856344c2d7242a83b30b7
|
4
|
+
data.tar.gz: a55c5f91d3bd260d400e79f1e9b58e93c70c9e73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0db597e0e7af75a78d584aca113d250f5fa065da89eef1f988d88fa75ca81c7b2ce211f05a28026024c45e3ce32f86c2f958392f831b87fb5fa076bfd58856bd
|
7
|
+
data.tar.gz: 03d130d21a488b3d17edb29e08340a0d4429c2324a1c984afa90e667248ff48145efcaac9bcaeaccaa10aabf04211dbdc6c46c6ee7ba92f07bc4fa34fab1ac35
|
data/ChangeLog.md
CHANGED
@@ -1,4 +1,16 @@
|
|
1
|
-
## Changes between Bunny 2.
|
1
|
+
## Changes between Bunny 2.6.0 and 2.6.1 (October 23rd, 2016)
|
2
|
+
|
3
|
+
### Bunny::ConsumerWorkPool#shutdown Terminates Early When It's Safe to Do So
|
4
|
+
|
5
|
+
`Bunny::ConsumerWorkPool#shutdown(true)` waited for consumer shutdown
|
6
|
+
even if the pool wasn't active (there were no consumers on its
|
7
|
+
channel).
|
8
|
+
|
9
|
+
GitHub issue: [#438](https://github.com/ruby-amqp/bunny/issues/438).
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## Changes between Bunny 2.5.0 and 2.6.0 (October 15th, 2016)
|
2
14
|
|
3
15
|
### Graceful Shutdown of Consumers
|
4
16
|
|
data/lib/bunny/channel.rb
CHANGED
@@ -952,7 +952,9 @@ module Bunny
|
|
952
952
|
@last_basic_cancel_ok = wait_on_continuations
|
953
953
|
end
|
954
954
|
|
955
|
-
|
955
|
+
# reduces thread usage for channels that don't have any
|
956
|
+
# consumers
|
957
|
+
@work_pool.shutdown(true) unless self.any_consumers?
|
956
958
|
|
957
959
|
@last_basic_cancel_ok
|
958
960
|
end
|
@@ -57,6 +57,7 @@ module Bunny
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def shutdown(wait_for_workers = false)
|
60
|
+
was_running = running?
|
60
61
|
@running = false
|
61
62
|
|
62
63
|
@size.times do
|
@@ -65,7 +66,7 @@ module Bunny
|
|
65
66
|
end
|
66
67
|
end
|
67
68
|
|
68
|
-
return
|
69
|
+
return if !(wait_for_workers && @shutdown_timeout && was_running)
|
69
70
|
|
70
71
|
@shutdown_mutex.synchronize do
|
71
72
|
@shutdown_conditional.wait(@shutdown_mutex, @shutdown_timeout)
|
data/lib/bunny/version.rb
CHANGED
@@ -97,8 +97,10 @@ describe Bunny::Consumer, "#cancel" do
|
|
97
97
|
sleep 1.0
|
98
98
|
|
99
99
|
ch = connection.create_channel
|
100
|
+
ch.confirm_select
|
100
101
|
ch.default_exchange.publish("", :routing_key => queue_name)
|
101
|
-
|
102
|
+
ch.wait_for_confirms
|
103
|
+
sleep 0.5
|
102
104
|
|
103
105
|
consumer.cancel
|
104
106
|
sleep 1.0
|
@@ -126,8 +128,10 @@ describe Bunny::Consumer, "#cancel" do
|
|
126
128
|
sleep 1.0
|
127
129
|
|
128
130
|
ch = connection.create_channel
|
131
|
+
ch.confirm_select
|
129
132
|
ch.default_exchange.publish("", :routing_key => queue_name)
|
130
|
-
|
133
|
+
ch.wait_for_confirms
|
134
|
+
sleep 0.5
|
131
135
|
|
132
136
|
consumer.cancel
|
133
137
|
sleep 1.0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bunny
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Duncan
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2016-10-
|
15
|
+
date: 2016-10-22 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: amq-protocol
|