rabbit_messaging 0.15.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/.rubocop.yml +6 -3
- data/CHANGELOG.md +10 -1
- data/Gemfile.lock +136 -130
- data/lib/rabbit/event_handler.rb +9 -0
- data/lib/rabbit/receiving/receive.rb +10 -2
- data/lib/rabbit/version.rb +1 -1
- data/rabbit_messaging.gemspec +5 -5
- metadata +15 -15
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/.rubocop.yml
CHANGED
@@ -14,12 +14,15 @@ AllCops:
|
|
14
14
|
- bin/console
|
15
15
|
- environments/*.rb
|
16
16
|
|
17
|
+
RSpec/ReceiveMessages:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
RSpec/VerifiedDoubleReference:
|
21
|
+
EnforcedStyle: string
|
22
|
+
|
17
23
|
Style/Alias:
|
18
24
|
EnforcedStyle: prefer_alias_method
|
19
25
|
|
20
26
|
Style/HashConversion:
|
21
27
|
Exclude:
|
22
28
|
- spec/**/*
|
23
|
-
|
24
|
-
RSpec/VerifiedDoubleReference:
|
25
|
-
EnforcedStyle: string
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
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
|
+
|
9
|
+
## [1.0.0] - 2024-10-23
|
10
|
+
### Changed
|
11
|
+
- Remove `sneakers` gem in favour of [kicks](https://github.com/ruby-amqp/kicks)
|
12
|
+
|
4
13
|
## [0.15.0] - 2024-06-05
|
5
14
|
### Added
|
6
15
|
- Support for custom reciving handler via `Rabbit.config.handler_resolver_callable` config;
|
@@ -23,7 +32,7 @@ All notable changes to this project will be documented in this file.
|
|
23
32
|
- `Gemfile.lock` added
|
24
33
|
|
25
34
|
### Fixed
|
26
|
-
- `unless Sneakers.logger` was never executed
|
35
|
+
- `unless Sneakers.logger` was never executed
|
27
36
|
|
28
37
|
## [0.11.0] - 2021-05-05
|
29
38
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -1,45 +1,45 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rabbit_messaging (0.
|
4
|
+
rabbit_messaging (1.0.0)
|
5
5
|
bunny (~> 2.0)
|
6
|
+
kicks (~> 3)
|
6
7
|
lamian
|
7
|
-
rails (>=
|
8
|
-
sneakers (~> 2.0)
|
8
|
+
rails (>= 6.1)
|
9
9
|
tainbox
|
10
10
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
actioncable (7.1.
|
15
|
-
actionpack (= 7.1.
|
16
|
-
activesupport (= 7.1.
|
14
|
+
actioncable (7.1.4.1)
|
15
|
+
actionpack (= 7.1.4.1)
|
16
|
+
activesupport (= 7.1.4.1)
|
17
17
|
nio4r (~> 2.0)
|
18
18
|
websocket-driver (>= 0.6.1)
|
19
19
|
zeitwerk (~> 2.6)
|
20
|
-
actionmailbox (7.1.
|
21
|
-
actionpack (= 7.1.
|
22
|
-
activejob (= 7.1.
|
23
|
-
activerecord (= 7.1.
|
24
|
-
activestorage (= 7.1.
|
25
|
-
activesupport (= 7.1.
|
20
|
+
actionmailbox (7.1.4.1)
|
21
|
+
actionpack (= 7.1.4.1)
|
22
|
+
activejob (= 7.1.4.1)
|
23
|
+
activerecord (= 7.1.4.1)
|
24
|
+
activestorage (= 7.1.4.1)
|
25
|
+
activesupport (= 7.1.4.1)
|
26
26
|
mail (>= 2.7.1)
|
27
27
|
net-imap
|
28
28
|
net-pop
|
29
29
|
net-smtp
|
30
|
-
actionmailer (7.1.
|
31
|
-
actionpack (= 7.1.
|
32
|
-
actionview (= 7.1.
|
33
|
-
activejob (= 7.1.
|
34
|
-
activesupport (= 7.1.
|
30
|
+
actionmailer (7.1.4.1)
|
31
|
+
actionpack (= 7.1.4.1)
|
32
|
+
actionview (= 7.1.4.1)
|
33
|
+
activejob (= 7.1.4.1)
|
34
|
+
activesupport (= 7.1.4.1)
|
35
35
|
mail (~> 2.5, >= 2.5.4)
|
36
36
|
net-imap
|
37
37
|
net-pop
|
38
38
|
net-smtp
|
39
39
|
rails-dom-testing (~> 2.2)
|
40
|
-
actionpack (7.1.
|
41
|
-
actionview (= 7.1.
|
42
|
-
activesupport (= 7.1.
|
40
|
+
actionpack (7.1.4.1)
|
41
|
+
actionview (= 7.1.4.1)
|
42
|
+
activesupport (= 7.1.4.1)
|
43
43
|
nokogiri (>= 1.8.5)
|
44
44
|
racc
|
45
45
|
rack (>= 2.2.4)
|
@@ -47,35 +47,35 @@ GEM
|
|
47
47
|
rack-test (>= 0.6.3)
|
48
48
|
rails-dom-testing (~> 2.2)
|
49
49
|
rails-html-sanitizer (~> 1.6)
|
50
|
-
actiontext (7.1.
|
51
|
-
actionpack (= 7.1.
|
52
|
-
activerecord (= 7.1.
|
53
|
-
activestorage (= 7.1.
|
54
|
-
activesupport (= 7.1.
|
50
|
+
actiontext (7.1.4.1)
|
51
|
+
actionpack (= 7.1.4.1)
|
52
|
+
activerecord (= 7.1.4.1)
|
53
|
+
activestorage (= 7.1.4.1)
|
54
|
+
activesupport (= 7.1.4.1)
|
55
55
|
globalid (>= 0.6.0)
|
56
56
|
nokogiri (>= 1.8.5)
|
57
|
-
actionview (7.1.
|
58
|
-
activesupport (= 7.1.
|
57
|
+
actionview (7.1.4.1)
|
58
|
+
activesupport (= 7.1.4.1)
|
59
59
|
builder (~> 3.1)
|
60
60
|
erubi (~> 1.11)
|
61
61
|
rails-dom-testing (~> 2.2)
|
62
62
|
rails-html-sanitizer (~> 1.6)
|
63
|
-
activejob (7.1.
|
64
|
-
activesupport (= 7.1.
|
63
|
+
activejob (7.1.4.1)
|
64
|
+
activesupport (= 7.1.4.1)
|
65
65
|
globalid (>= 0.3.6)
|
66
|
-
activemodel (7.1.
|
67
|
-
activesupport (= 7.1.
|
68
|
-
activerecord (7.1.
|
69
|
-
activemodel (= 7.1.
|
70
|
-
activesupport (= 7.1.
|
66
|
+
activemodel (7.1.4.1)
|
67
|
+
activesupport (= 7.1.4.1)
|
68
|
+
activerecord (7.1.4.1)
|
69
|
+
activemodel (= 7.1.4.1)
|
70
|
+
activesupport (= 7.1.4.1)
|
71
71
|
timeout (>= 0.4.0)
|
72
|
-
activestorage (7.1.
|
73
|
-
actionpack (= 7.1.
|
74
|
-
activejob (= 7.1.
|
75
|
-
activerecord (= 7.1.
|
76
|
-
activesupport (= 7.1.
|
72
|
+
activestorage (7.1.4.1)
|
73
|
+
actionpack (= 7.1.4.1)
|
74
|
+
activejob (= 7.1.4.1)
|
75
|
+
activerecord (= 7.1.4.1)
|
76
|
+
activesupport (= 7.1.4.1)
|
77
77
|
marcel (~> 1.0)
|
78
|
-
activesupport (7.1.
|
78
|
+
activesupport (7.1.4.1)
|
79
79
|
base64
|
80
80
|
bigdecimal
|
81
81
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
@@ -89,34 +89,42 @@ GEM
|
|
89
89
|
ast (2.4.2)
|
90
90
|
base64 (0.2.0)
|
91
91
|
bigdecimal (3.1.8)
|
92
|
-
builder (3.
|
93
|
-
bundler-audit (0.9.
|
92
|
+
builder (3.3.0)
|
93
|
+
bundler-audit (0.9.2)
|
94
94
|
bundler (>= 1.2.0, < 3)
|
95
95
|
thor (~> 1.0)
|
96
|
-
bunny (2.
|
96
|
+
bunny (2.23.0)
|
97
97
|
amq-protocol (~> 2.3, >= 2.3.1)
|
98
98
|
sorted_set (~> 1, >= 1.0.2)
|
99
99
|
coderay (1.1.3)
|
100
|
-
concurrent-ruby (1.
|
100
|
+
concurrent-ruby (1.3.4)
|
101
101
|
connection_pool (2.4.1)
|
102
102
|
crass (1.0.6)
|
103
103
|
date (3.3.4)
|
104
104
|
diff-lcs (1.5.1)
|
105
|
-
docile (1.4.
|
105
|
+
docile (1.4.1)
|
106
106
|
drb (2.2.1)
|
107
|
-
erubi (1.
|
107
|
+
erubi (1.13.0)
|
108
108
|
globalid (1.2.1)
|
109
109
|
activesupport (>= 6.1)
|
110
|
-
i18n (1.14.
|
110
|
+
i18n (1.14.6)
|
111
111
|
concurrent-ruby (~> 1.0)
|
112
112
|
io-console (0.7.2)
|
113
|
-
irb (1.
|
113
|
+
irb (1.14.1)
|
114
114
|
rdoc (>= 4.0.0)
|
115
115
|
reline (>= 0.4.2)
|
116
|
-
json (2.
|
117
|
-
|
116
|
+
json (2.7.2)
|
117
|
+
kicks (3.1.0)
|
118
|
+
bunny (~> 2.19)
|
119
|
+
concurrent-ruby (~> 1.0)
|
120
|
+
rake (>= 12.3, < 14.0)
|
121
|
+
serverengine (~> 2.1)
|
122
|
+
thor
|
123
|
+
lamian (1.9.0)
|
118
124
|
rails (>= 4.2)
|
119
|
-
|
125
|
+
language_server-protocol (3.17.0.3)
|
126
|
+
logger (1.6.1)
|
127
|
+
loofah (2.23.1)
|
120
128
|
crass (~> 1.0.2)
|
121
129
|
nokogiri (>= 1.12.0)
|
122
130
|
mail (2.8.1)
|
@@ -127,10 +135,10 @@ GEM
|
|
127
135
|
marcel (1.0.4)
|
128
136
|
method_source (1.1.0)
|
129
137
|
mini_mime (1.1.5)
|
130
|
-
mini_portile2 (2.8.
|
131
|
-
minitest (5.
|
138
|
+
mini_portile2 (2.8.8)
|
139
|
+
minitest (5.25.1)
|
132
140
|
mutex_m (0.2.0)
|
133
|
-
net-imap (0.4.
|
141
|
+
net-imap (0.4.17)
|
134
142
|
date
|
135
143
|
net-protocol
|
136
144
|
net-pop (0.1.2)
|
@@ -140,19 +148,20 @@ GEM
|
|
140
148
|
net-smtp (0.5.0)
|
141
149
|
net-protocol
|
142
150
|
nio4r (2.7.3)
|
143
|
-
nokogiri (1.16.
|
151
|
+
nokogiri (1.16.8)
|
144
152
|
mini_portile2 (~> 2.8.2)
|
145
153
|
racc (~> 1.4)
|
146
|
-
parallel (1.
|
147
|
-
parser (3.
|
154
|
+
parallel (1.26.3)
|
155
|
+
parser (3.3.5.0)
|
148
156
|
ast (~> 2.4.1)
|
157
|
+
racc
|
149
158
|
pry (0.14.2)
|
150
159
|
coderay (~> 1.1)
|
151
160
|
method_source (~> 1.0)
|
152
161
|
psych (5.1.2)
|
153
162
|
stringio
|
154
|
-
racc (1.8.
|
155
|
-
rack (3.
|
163
|
+
racc (1.8.1)
|
164
|
+
rack (3.1.8)
|
156
165
|
rack-session (2.0.0)
|
157
166
|
rack (>= 3.0.0)
|
158
167
|
rack-test (2.1.0)
|
@@ -160,30 +169,30 @@ GEM
|
|
160
169
|
rackup (2.1.0)
|
161
170
|
rack (>= 3)
|
162
171
|
webrick (~> 1.8)
|
163
|
-
rails (7.1.
|
164
|
-
actioncable (= 7.1.
|
165
|
-
actionmailbox (= 7.1.
|
166
|
-
actionmailer (= 7.1.
|
167
|
-
actionpack (= 7.1.
|
168
|
-
actiontext (= 7.1.
|
169
|
-
actionview (= 7.1.
|
170
|
-
activejob (= 7.1.
|
171
|
-
activemodel (= 7.1.
|
172
|
-
activerecord (= 7.1.
|
173
|
-
activestorage (= 7.1.
|
174
|
-
activesupport (= 7.1.
|
172
|
+
rails (7.1.4.1)
|
173
|
+
actioncable (= 7.1.4.1)
|
174
|
+
actionmailbox (= 7.1.4.1)
|
175
|
+
actionmailer (= 7.1.4.1)
|
176
|
+
actionpack (= 7.1.4.1)
|
177
|
+
actiontext (= 7.1.4.1)
|
178
|
+
actionview (= 7.1.4.1)
|
179
|
+
activejob (= 7.1.4.1)
|
180
|
+
activemodel (= 7.1.4.1)
|
181
|
+
activerecord (= 7.1.4.1)
|
182
|
+
activestorage (= 7.1.4.1)
|
183
|
+
activesupport (= 7.1.4.1)
|
175
184
|
bundler (>= 1.15.0)
|
176
|
-
railties (= 7.1.
|
185
|
+
railties (= 7.1.4.1)
|
177
186
|
rails-dom-testing (2.2.0)
|
178
187
|
activesupport (>= 5.0.0)
|
179
188
|
minitest
|
180
189
|
nokogiri (>= 1.6)
|
181
|
-
rails-html-sanitizer (1.6.
|
190
|
+
rails-html-sanitizer (1.6.1)
|
182
191
|
loofah (~> 2.21)
|
183
|
-
nokogiri (
|
184
|
-
railties (7.1.
|
185
|
-
actionpack (= 7.1.
|
186
|
-
activesupport (= 7.1.
|
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
|
+
railties (7.1.4.1)
|
194
|
+
actionpack (= 7.1.4.1)
|
195
|
+
activesupport (= 7.1.4.1)
|
187
196
|
irb
|
188
197
|
rackup (>= 1.0.0)
|
189
198
|
rake (>= 12.2)
|
@@ -194,94 +203,91 @@ GEM
|
|
194
203
|
rbtree (0.4.6)
|
195
204
|
rdoc (6.7.0)
|
196
205
|
psych (>= 4.0.0)
|
197
|
-
regexp_parser (2.
|
198
|
-
reline (0.5.
|
206
|
+
regexp_parser (2.9.2)
|
207
|
+
reline (0.5.10)
|
199
208
|
io-console (~> 0.5)
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
rspec-
|
204
|
-
|
205
|
-
rspec-
|
206
|
-
rspec-
|
207
|
-
rspec-support (~> 3.12.0)
|
208
|
-
rspec-expectations (3.12.2)
|
209
|
+
rspec (3.13.0)
|
210
|
+
rspec-core (~> 3.13.0)
|
211
|
+
rspec-expectations (~> 3.13.0)
|
212
|
+
rspec-mocks (~> 3.13.0)
|
213
|
+
rspec-core (3.13.2)
|
214
|
+
rspec-support (~> 3.13.0)
|
215
|
+
rspec-expectations (3.13.3)
|
209
216
|
diff-lcs (>= 1.2.0, < 2.0)
|
210
|
-
rspec-support (~> 3.
|
211
|
-
rspec-its (1.3.
|
217
|
+
rspec-support (~> 3.13.0)
|
218
|
+
rspec-its (1.3.1)
|
212
219
|
rspec-core (>= 3.0.0)
|
213
220
|
rspec-expectations (>= 3.0.0)
|
214
|
-
rspec-mocks (3.
|
221
|
+
rspec-mocks (3.13.2)
|
215
222
|
diff-lcs (>= 1.2.0, < 2.0)
|
216
|
-
rspec-support (~> 3.
|
217
|
-
rspec-support (3.
|
218
|
-
rubocop (1.
|
223
|
+
rspec-support (~> 3.13.0)
|
224
|
+
rspec-support (3.13.1)
|
225
|
+
rubocop (1.66.1)
|
219
226
|
json (~> 2.3)
|
227
|
+
language_server-protocol (>= 3.17.0)
|
220
228
|
parallel (~> 1.10)
|
221
|
-
parser (>= 3.
|
229
|
+
parser (>= 3.3.0.2)
|
222
230
|
rainbow (>= 2.2.2, < 4.0)
|
223
|
-
regexp_parser (>=
|
224
|
-
|
225
|
-
rubocop-ast (>= 1.24.1, < 2.0)
|
231
|
+
regexp_parser (>= 2.4, < 3.0)
|
232
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
226
233
|
ruby-progressbar (~> 1.7)
|
227
234
|
unicode-display_width (>= 2.4.0, < 3.0)
|
228
|
-
rubocop-ast (1.
|
229
|
-
parser (>= 3.
|
230
|
-
rubocop-config-umbrellio (1.
|
231
|
-
rubocop (~> 1.
|
232
|
-
rubocop-
|
233
|
-
rubocop-
|
235
|
+
rubocop-ast (1.32.3)
|
236
|
+
parser (>= 3.3.1.0)
|
237
|
+
rubocop-config-umbrellio (1.66.0.99)
|
238
|
+
rubocop (~> 1.66.0)
|
239
|
+
rubocop-factory_bot (~> 2.26.0)
|
240
|
+
rubocop-performance (~> 1.22.0)
|
241
|
+
rubocop-rails (~> 2.26.0)
|
234
242
|
rubocop-rake (~> 0.6.0)
|
235
|
-
rubocop-rspec (~>
|
243
|
+
rubocop-rspec (~> 3.0.0)
|
236
244
|
rubocop-sequel (~> 0.3.3)
|
237
|
-
rubocop-
|
238
|
-
rubocop (
|
239
|
-
|
240
|
-
|
245
|
+
rubocop-factory_bot (2.26.1)
|
246
|
+
rubocop (~> 1.61)
|
247
|
+
rubocop-performance (1.22.1)
|
248
|
+
rubocop (>= 1.48.1, < 2.0)
|
249
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
250
|
+
rubocop-rails (2.26.2)
|
241
251
|
activesupport (>= 4.2.0)
|
242
252
|
rack (>= 1.1)
|
243
|
-
rubocop (>= 1.
|
253
|
+
rubocop (>= 1.52.0, < 2.0)
|
254
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
244
255
|
rubocop-rake (0.6.0)
|
245
256
|
rubocop (~> 1.0)
|
246
|
-
rubocop-rspec (
|
247
|
-
rubocop (~> 1.
|
257
|
+
rubocop-rspec (3.0.5)
|
258
|
+
rubocop (~> 1.61)
|
248
259
|
rubocop-sequel (0.3.4)
|
249
260
|
rubocop (~> 1.0)
|
250
|
-
ruby-progressbar (1.
|
251
|
-
serverengine (2.0
|
261
|
+
ruby-progressbar (1.13.0)
|
262
|
+
serverengine (2.4.0)
|
263
|
+
base64 (~> 0.1)
|
264
|
+
logger (~> 1.4)
|
252
265
|
sigdump (~> 0.2.2)
|
253
|
-
set (1.0
|
254
|
-
sigdump (0.2.
|
266
|
+
set (1.1.0)
|
267
|
+
sigdump (0.2.5)
|
255
268
|
simplecov (0.22.0)
|
256
269
|
docile (~> 1.1)
|
257
270
|
simplecov-html (~> 0.11)
|
258
271
|
simplecov_json_formatter (~> 0.1)
|
259
|
-
simplecov-html (0.
|
272
|
+
simplecov-html (0.13.1)
|
260
273
|
simplecov-lcov (0.8.0)
|
261
274
|
simplecov_json_formatter (0.1.4)
|
262
|
-
sneakers (2.11.0)
|
263
|
-
bunny (~> 2.12)
|
264
|
-
concurrent-ruby (~> 1.0)
|
265
|
-
rake
|
266
|
-
serverengine (~> 2.0.5)
|
267
|
-
thor
|
268
275
|
sorted_set (1.0.3)
|
269
276
|
rbtree
|
270
277
|
set (~> 1.0)
|
271
|
-
stringio (3.1.
|
272
|
-
strscan (3.1.0)
|
278
|
+
stringio (3.1.1)
|
273
279
|
tainbox (2.1.2)
|
274
280
|
activesupport
|
275
|
-
thor (1.3.
|
281
|
+
thor (1.3.2)
|
276
282
|
timeout (0.4.1)
|
277
283
|
tzinfo (2.0.6)
|
278
284
|
concurrent-ruby (~> 1.0)
|
279
|
-
unicode-display_width (2.
|
280
|
-
webrick (1.8.
|
285
|
+
unicode-display_width (2.6.0)
|
286
|
+
webrick (1.8.2)
|
281
287
|
websocket-driver (0.7.6)
|
282
288
|
websocket-extensions (>= 0.1.0)
|
283
289
|
websocket-extensions (0.1.5)
|
284
|
-
zeitwerk (2.6.
|
290
|
+
zeitwerk (2.6.18)
|
285
291
|
|
286
292
|
PLATFORMS
|
287
293
|
ruby
|
@@ -300,4 +306,4 @@ DEPENDENCIES
|
|
300
306
|
simplecov-lcov
|
301
307
|
|
302
308
|
BUNDLED WITH
|
303
|
-
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
data/rabbit_messaging.gemspec
CHANGED
@@ -19,9 +19,9 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^spec/}) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
|
-
spec.
|
23
|
-
spec.
|
24
|
-
spec.
|
25
|
-
spec.
|
26
|
-
spec.
|
22
|
+
spec.add_dependency "bunny", "~> 2.0"
|
23
|
+
spec.add_dependency "kicks", "~> 3"
|
24
|
+
spec.add_dependency "lamian"
|
25
|
+
spec.add_dependency "rails", ">= 6.1"
|
26
|
+
spec.add_dependency "tainbox"
|
27
27
|
end
|
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:
|
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-06
|
11
|
+
date: 2024-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -25,47 +25,47 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: kicks
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '3'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: lamian
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '6.1'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '6.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: tainbox
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|