rabbit_messaging 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +6 -6
- data/lib/rabbit/event_handler.rb +9 -0
- data/lib/rabbit/receiving/receive.rb +10 -2
- data/lib/rabbit/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3aae702e7468b2923bc2ef9e035e7a3e164a71a99d8b06899c7c8668777e4787
|
4
|
+
data.tar.gz: 2842649bf7388b181de3aaf110d08f3c672139287538996e4035ab3b13e91fba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30bb1fbd10bf9e57e357ca08afa3758ec21c8deeab15355c7eae0af8f3849a1fc2afb7fb9c460ff6329933158d5d699cb5a75a5b3a5afd50cc1e24152209fb08
|
7
|
+
data.tar.gz: e0a3b8553941e677bc6418838470a9e2159756899609bba01ffb2e81004da38f04e26c1dc698acdda149ea8b888c767840b301430fe8d8df94e4b153be7d4beb
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
+
## [1.1.0] - 2024-12-06
|
5
|
+
### Added
|
6
|
+
- **Receiving**
|
7
|
+
- Support for custom receiving job config which is placed in receiving event handler;
|
8
|
+
|
4
9
|
## [1.0.0] - 2024-10-23
|
5
10
|
### Changed
|
6
11
|
- Remove `sneakers` gem in favour of [kicks](https://github.com/ruby-amqp/kicks)
|
data/Gemfile.lock
CHANGED
@@ -124,7 +124,7 @@ GEM
|
|
124
124
|
rails (>= 4.2)
|
125
125
|
language_server-protocol (3.17.0.3)
|
126
126
|
logger (1.6.1)
|
127
|
-
loofah (2.
|
127
|
+
loofah (2.23.1)
|
128
128
|
crass (~> 1.0.2)
|
129
129
|
nokogiri (>= 1.12.0)
|
130
130
|
mail (2.8.1)
|
@@ -135,7 +135,7 @@ GEM
|
|
135
135
|
marcel (1.0.4)
|
136
136
|
method_source (1.1.0)
|
137
137
|
mini_mime (1.1.5)
|
138
|
-
mini_portile2 (2.8.
|
138
|
+
mini_portile2 (2.8.8)
|
139
139
|
minitest (5.25.1)
|
140
140
|
mutex_m (0.2.0)
|
141
141
|
net-imap (0.4.17)
|
@@ -148,7 +148,7 @@ GEM
|
|
148
148
|
net-smtp (0.5.0)
|
149
149
|
net-protocol
|
150
150
|
nio4r (2.7.3)
|
151
|
-
nokogiri (1.16.
|
151
|
+
nokogiri (1.16.8)
|
152
152
|
mini_portile2 (~> 2.8.2)
|
153
153
|
racc (~> 1.4)
|
154
154
|
parallel (1.26.3)
|
@@ -187,9 +187,9 @@ GEM
|
|
187
187
|
activesupport (>= 5.0.0)
|
188
188
|
minitest
|
189
189
|
nokogiri (>= 1.6)
|
190
|
-
rails-html-sanitizer (1.6.
|
190
|
+
rails-html-sanitizer (1.6.1)
|
191
191
|
loofah (~> 2.21)
|
192
|
-
nokogiri (
|
192
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
193
193
|
railties (7.1.4.1)
|
194
194
|
actionpack (= 7.1.4.1)
|
195
195
|
activesupport (= 7.1.4.1)
|
@@ -306,4 +306,4 @@ DEPENDENCIES
|
|
306
306
|
simplecov-lcov
|
307
307
|
|
308
308
|
BUNDLED WITH
|
309
|
-
2.
|
309
|
+
2.5.22
|
data/lib/rabbit/event_handler.rb
CHANGED
@@ -12,6 +12,7 @@ class Rabbit::EventHandler
|
|
12
12
|
|
13
13
|
class_attribute :queue
|
14
14
|
class_attribute :ignore_queue_conversion, default: false
|
15
|
+
class_attribute :additional_job_configs, default: {}
|
15
16
|
|
16
17
|
class << self
|
17
18
|
private
|
@@ -19,6 +20,14 @@ class Rabbit::EventHandler
|
|
19
20
|
def queue_as(queue = nil, &block)
|
20
21
|
self.queue = queue || block
|
21
22
|
end
|
23
|
+
|
24
|
+
def job_config(**config_opts)
|
25
|
+
additional_job_configs.merge!(config_opts)
|
26
|
+
end
|
27
|
+
|
28
|
+
def job_configs(**config_opts)
|
29
|
+
self.additional_job_configs = config_opts
|
30
|
+
end
|
22
31
|
end
|
23
32
|
|
24
33
|
def initialize(message)
|
@@ -28,7 +28,7 @@ class Rabbit::Receiving::Receive
|
|
28
28
|
|
29
29
|
def process_message
|
30
30
|
job_class
|
31
|
-
.set(queue:
|
31
|
+
.set(queue: queue_name, **job_configs)
|
32
32
|
.perform_later(message, message_info)
|
33
33
|
end
|
34
34
|
|
@@ -53,7 +53,15 @@ class Rabbit::Receiving::Receive
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def queue
|
56
|
-
Rabbit::Receiving::Queue.new(message, arguments)
|
56
|
+
@queue ||= Rabbit::Receiving::Queue.new(message, arguments)
|
57
|
+
end
|
58
|
+
|
59
|
+
def job_configs
|
60
|
+
queue.handler.additional_job_configs
|
61
|
+
end
|
62
|
+
|
63
|
+
def queue_name
|
64
|
+
queue.name
|
57
65
|
end
|
58
66
|
|
59
67
|
def job_class
|
data/lib/rabbit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbit_messaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Umbrellio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.5.
|
142
|
+
rubygems_version: 3.5.3
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Rabbit (Rabbit Messaging)
|