rabbit_carrots 0.1.12 → 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 -13
- 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 -15
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
@@ -1,31 +1,21 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rabbit_carrots (0.1.
|
5
|
-
activesupport (>= 6.0.0)
|
4
|
+
rabbit_carrots (0.1.14)
|
6
5
|
bunny (>= 2.19.0)
|
7
6
|
connection_pool (~> 2.3.0)
|
8
7
|
|
9
8
|
GEM
|
10
9
|
remote: https://rubygems.org/
|
11
10
|
specs:
|
12
|
-
activesupport (7.0.4)
|
13
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
-
i18n (>= 1.6, < 2)
|
15
|
-
minitest (>= 5.1)
|
16
|
-
tzinfo (~> 2.0)
|
17
11
|
amq-protocol (2.3.2)
|
18
12
|
ast (2.4.2)
|
19
13
|
bunny (2.19.0)
|
20
14
|
amq-protocol (~> 2.3, >= 2.3.1)
|
21
15
|
sorted_set (~> 1, >= 1.0.2)
|
22
|
-
concurrent-ruby (1.1.10)
|
23
16
|
connection_pool (2.3.0)
|
24
17
|
diff-lcs (1.5.0)
|
25
|
-
i18n (1.12.0)
|
26
|
-
concurrent-ruby (~> 1.0)
|
27
18
|
json (2.6.2)
|
28
|
-
minitest (5.16.3)
|
29
19
|
parallel (1.22.1)
|
30
20
|
parser (3.1.2.1)
|
31
21
|
ast (~> 2.4.1)
|
@@ -64,8 +54,6 @@ GEM
|
|
64
54
|
sorted_set (1.0.3)
|
65
55
|
rbtree
|
66
56
|
set (~> 1.0)
|
67
|
-
tzinfo (2.0.5)
|
68
|
-
concurrent-ruby (~> 1.0)
|
69
57
|
unicode-display_width (2.3.0)
|
70
58
|
|
71
59
|
PLATFORMS
|
@@ -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
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbit_carrots
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brusk Awat
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 2.3.0
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: activesupport
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 6.0.0
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 6.0.0
|
55
41
|
description: A background task based on rake to consume RabbitMQ messages
|
56
42
|
email:
|
57
43
|
- broosk.edogawa@gmail.com
|