rabbit_carrots 0.1.16 → 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: c8da9ad2d662b3217200cf1746b14244f8d2fe3c272fbee89eb7a6b8e7d47516
4
- data.tar.gz: 9b5288fe33e7231bd75fe85112ed6ce1414b268f034f2fb6c3031abc03b14c56
3
+ metadata.gz: c9fb1f67171e4f18f2e1640592ce820233d76456b78b764e72f8b4a811b85383
4
+ data.tar.gz: 535403deef2e78e75be7ddc1572bd7773d464b55061e5f3a7ac5265b5e37309c
5
5
  SHA512:
6
- metadata.gz: 353444e8b88fe16bfb4666eb3551873caaba9b5b78f6d70973e0f62bd856a063e0e9483b46204e23bdc92d14b744f10f6920db176c86893b00e14c686a8c5684
7
- data.tar.gz: 1d003c714f6d26a9c68cacc740bc57e044d80f9dfb47bf1e4f40416f2989f65e1ed4f2be6b9690159f4ddb8366f9e253cfa31aa5b98cce95decda71215087c3d
6
+ metadata.gz: d5f04fe09bbc7bb71fa85237e526cb011f039e6010547ab3d27de1abdb4b98892bf256cc33b380a353e7482852f3e90cd9fb7255f757a0391961ffa140e679d6
7
+ data.tar.gz: 3b7c2b59a8bfd51d1ce2a26886afd46049df699f876e9afd2c810e22ad17e75e579e6790cc6db1b91dd45e6150fa73f5aaedcbe7f4968afc9daef9eaafe2e571
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rabbit_carrots (0.1.15)
4
+ rabbit_carrots (0.1.17)
5
5
  bunny (>= 2.19.0)
6
6
  connection_pool (~> 2.3.0)
7
7
 
@@ -15,7 +15,7 @@ GEM
15
15
  tzinfo (~> 2.0)
16
16
  amq-protocol (2.3.2)
17
17
  ast (2.4.2)
18
- bunny (2.19.0)
18
+ bunny (2.20.3)
19
19
  amq-protocol (~> 2.3, >= 2.3.1)
20
20
  sorted_set (~> 1, >= 1.0.2)
21
21
  concurrent-ruby (1.1.10)
@@ -28,10 +28,10 @@ GEM
28
28
  parallel (1.22.1)
29
29
  parser (3.1.2.1)
30
30
  ast (~> 2.4.1)
31
- rack (3.0.1)
31
+ rack (3.0.4.2)
32
32
  rainbow (3.1.1)
33
33
  rake (13.0.6)
34
- rbtree (0.4.5)
34
+ rbtree (0.4.6)
35
35
  regexp_parser (2.6.1)
36
36
  rexml (3.2.5)
37
37
  rspec (3.12.0)
@@ -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.16'
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.16
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-02-14 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
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  requirements: []
88
- rubygems_version: 3.3.7
88
+ rubygems_version: 3.4.1
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: A simple RabbitMQ consumer task