rabbit_carrots 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rabbit_carrots/tasks/rmq.rake +3 -3
- data/lib/rabbit_carrots/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9fb1f67171e4f18f2e1640592ce820233d76456b78b764e72f8b4a811b85383
|
4
|
+
data.tar.gz: 535403deef2e78e75be7ddc1572bd7773d464b55061e5f3a7ac5265b5e37309c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5f04fe09bbc7bb71fa85237e526cb011f039e6010547ab3d27de1abdb4b98892bf256cc33b380a353e7482852f3e90cd9fb7255f757a0391961ffa140e679d6
|
7
|
+
data.tar.gz: 3b7c2b59a8bfd51d1ce2a26886afd46049df699f876e9afd2c810e22ad17e75e579e6790cc6db1b91dd45e6150fa73f5aaedcbe7f4968afc9daef9eaafe2e571
|
@@ -18,7 +18,7 @@ namespace :rabbit_carrots do
|
|
18
18
|
|
19
19
|
raise "#{handler_class.name} must respond to `handle!`" unless handler_class.respond_to?(:handle!)
|
20
20
|
|
21
|
-
run_task(queue_name: channel[:queue], handler_class:, routing_keys: channel[:routing_keys])
|
21
|
+
run_task(queue_name: channel[:queue], handler_class:, routing_keys: channel[:routing_keys], queue_arguments: channel[:arguments])
|
22
22
|
end
|
23
23
|
|
24
24
|
# Infinite loop to keep the process running
|
@@ -28,12 +28,12 @@ namespace :rabbit_carrots do
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
def run_task(queue_name:, handler_class:, routing_keys:)
|
31
|
+
def run_task(queue_name:, queue_arguments: {}, handler_class:, routing_keys:)
|
32
32
|
RabbitCarrots::Connection.instance.channel.with do |channel|
|
33
33
|
exchange = channel.topic(RabbitCarrots.configuration.event_bus_exchange_name, durable: true)
|
34
34
|
|
35
35
|
Rails.logger.info "Listening on QUEUE: #{queue_name} for ROUTING KEYS: #{routing_keys}"
|
36
|
-
queue = channel.queue(queue_name, durable: true)
|
36
|
+
queue = channel.queue(queue_name, durable: true, arguments: queue_arguments)
|
37
37
|
|
38
38
|
routing_keys.map(&:strip).each { |k| queue.bind(exchange, routing_key: k) }
|
39
39
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brusk Awat
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|