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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 29ee56c912e4fabd7a4dee2b9e5a30b7797e36f385cee27d0e63216ebd9e9e1a
4
- data.tar.gz: 4f8ceb93851568835c9deee10b4b9cdae7a292574c28627234039b3cdae39242
3
+ metadata.gz: c9fb1f67171e4f18f2e1640592ce820233d76456b78b764e72f8b4a811b85383
4
+ data.tar.gz: 535403deef2e78e75be7ddc1572bd7773d464b55061e5f3a7ac5265b5e37309c
5
5
  SHA512:
6
- metadata.gz: 06f4a05b94bd703fc6cce405f8579c5be9431e768e80f9a8f1767a1897f9def88b430cc27a803953f59a42c6df7ebc7de2757ecaf61626dc7e7cffc512c0b6cd
7
- data.tar.gz: 2d102d1745e169b3e1a016a028fbe153715132509385fe102dfdc68e4a1c28643da2ccfa43c7bccf0e2ff7f30d3bbc2f5c2e2f6063001befdbd1f60476d0070d
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RabbitCarrots
4
- VERSION = '0.1.17'
4
+ VERSION = '0.1.18'
5
5
  end
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.17
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 00:00:00.000000000 Z
11
+ date: 2023-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny