rabbit_feed 2.4.1 → 2.4.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a93c5517c96292a4f5b66d94f7b47e22a4b03e7
|
4
|
+
data.tar.gz: e7287f3b58512d1f978b12f76c4cbbf0dcf93de3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0915d485965f4d1d8af0164c1fdfa958f6e332405c7dbb48416a9c0646911320362a780abbcf7382cedf95a5014c0cd0818906f4d859a545f1312d454e6c8d49
|
7
|
+
data.tar.gz: 024c4dace050cb7c72e09333d88a5eede77e68f4d1c549daaf4c557a94ad4fd5f67e6647931cfb5731219775bb2c4af04018eb0ca2bc34219d71936eb0b985bf
|
@@ -37,7 +37,7 @@ module RabbitFeed
|
|
37
37
|
end
|
38
38
|
|
39
39
|
sleep # Sleep indefinitely, as the consumer runs in its own thread
|
40
|
-
rescue SystemExit, Interrupt
|
40
|
+
rescue SystemExit, Interrupt, SignalException
|
41
41
|
RabbitFeed.log.info {{ event: :unsubscribe_from_queue, queue: RabbitFeed.configuration.queue }}
|
42
42
|
ensure
|
43
43
|
(cancel_consumer consumer) if consumer.present?
|
data/lib/rabbit_feed/version.rb
CHANGED
@@ -79,6 +79,34 @@ module RabbitFeed
|
|
79
79
|
|
80
80
|
context 'when an exception is raised' do
|
81
81
|
|
82
|
+
context 'when the exception is' do
|
83
|
+
[SystemExit.new, Interrupt.new, SignalException.new('SIGTERM')].each do |exception|
|
84
|
+
context exception.to_s do
|
85
|
+
let!(:logger) do
|
86
|
+
test_logger_string_io = StringIO.new
|
87
|
+
logger = Logger.new test_logger_string_io
|
88
|
+
logger.formatter = RabbitFeed::JsonLogFormatter
|
89
|
+
old_logger = RabbitFeed.log
|
90
|
+
RabbitFeed.log = logger
|
91
|
+
test_logger_string_io
|
92
|
+
end
|
93
|
+
|
94
|
+
before { allow(subject).to receive(:handle_message).and_raise(exception) }
|
95
|
+
|
96
|
+
it 'does not re-raise error' do
|
97
|
+
expect { subject.consume { } }.to_not raise_error
|
98
|
+
end
|
99
|
+
|
100
|
+
it 'logs unsubscribe_from_queue' do
|
101
|
+
subject.consume { }
|
102
|
+
|
103
|
+
expect(logger.string).to match /unsubscribe_from_queue/
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
82
110
|
context 'when consumer_exit_after_fail is true' do
|
83
111
|
before { allow(RabbitFeed.configuration).to receive(:consumer_exit_after_fail).and_return(true) }
|
84
112
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbit_feed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simply Business
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -368,7 +368,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
368
368
|
version: '0'
|
369
369
|
requirements: []
|
370
370
|
rubyforge_project:
|
371
|
-
rubygems_version: 2.
|
371
|
+
rubygems_version: 2.0.14
|
372
372
|
signing_key:
|
373
373
|
specification_version: 4
|
374
374
|
summary: Enables your Ruby applications to perform centralized event logging with
|