rabbit_carrots 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rabbit_carrots/tasks/rmq.rake +2 -2
- data/lib/rabbit_carrots/version.rb +1 -1
- data/lib/rabbit_carrots.rb +13 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e9ab2a20f355e4ca1f3cca3ebc0c809650de453d2cbdbe80f9cd5255920fd7b
|
4
|
+
data.tar.gz: f3b1ec00ac41796b70db5ad89ac17e4d170b5372575ca281ec0b55737abad6e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb1e241226b30bd1c2f8abcbc0b7adc355addcb9a6cdfd6d3bf1f995b1f457a328b9f4d7633fa56018c98c8a87062e622c84caaf8f3df78fe866941ba06ea680
|
7
|
+
data.tar.gz: f36e5866e32477b3a130c1ecd34876961fc78a58a2ab7d562b2f8338436e6fe6b1be9e8af2bbc5f6bf3c38c52b4f76799201c2e5610c1fbbcc9aeed3180bb051
|
data/Gemfile.lock
CHANGED
@@ -41,10 +41,10 @@ def run_task(queue_name:, handler_class:, routing_keys:)
|
|
41
41
|
Rails.logger.info "Received from queue: #{queue_name}, Routing Keys: #{routing_keys}"
|
42
42
|
handler_class.handle!(channel, delivery_info, properties, payload)
|
43
43
|
channel.ack(delivery_info.delivery_tag, false)
|
44
|
-
rescue EventHandlers::Errors::NackMessage, JSON::ParserError => _e
|
44
|
+
rescue RabbitCarrots::EventHandlers::Errors::NackMessage, JSON::ParserError => _e
|
45
45
|
Rails.logger.info "Nacked message: #{payload}"
|
46
46
|
channel.nack(delivery_info.delivery_tag, false, false)
|
47
|
-
rescue EventHandlers::Errors::NackAndRequeueMessage => _e
|
47
|
+
rescue RabbitCarrots::EventHandlers::Errors::NackAndRequeueMessage => _e
|
48
48
|
Rails.logger.info "Nacked and Requeued message: #{payload}"
|
49
49
|
channel.nack(delivery_info.delivery_tag, false, true)
|
50
50
|
rescue StandardError => e
|
data/lib/rabbit_carrots.rb
CHANGED
@@ -8,5 +8,17 @@ require 'rabbit_carrots/railtie' if defined?(Rails)
|
|
8
8
|
|
9
9
|
module RabbitCarrots
|
10
10
|
class Error < StandardError; end
|
11
|
-
|
11
|
+
module EventHandlers
|
12
|
+
module Errors
|
13
|
+
class IrrelevantMessage < StandardError
|
14
|
+
end
|
15
|
+
|
16
|
+
class NackMessage < StandardError
|
17
|
+
end
|
18
|
+
|
19
|
+
class NackAndRequeueMessage < StandardError
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
12
24
|
end
|