File tree 6 files changed +24
-12
lines changed
6 files changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,4 @@ gem "rspec-its"
13
13
gem "rubocop-config-umbrellio"
14
14
gem "simplecov"
15
15
gem "simplecov-lcov"
16
+ gem "sneakers_handlers" , github : "umbrellio/sneakers_handlers" , branch : "gt-1241-test-rabbit-dlx"
Original file line number Diff line number Diff line change
1
+ GIT
2
+ remote: https://github.com/umbrellio/sneakers_handlers.git
3
+ revision: 2fd531a99c85f042923ae8b8bd0f3b340af4d15f
4
+ branch: gt-1241-test-rabbit-dlx
5
+ specs:
6
+ sneakers_handlers (0.1.0 )
7
+ kicks
8
+
1
9
PATH
2
10
remote: .
3
11
specs:
6
14
kicks (~> 3 )
7
15
lamian
8
16
rails (>= 6.1 )
9
- sneakers_handlers
10
17
tainbox
11
18
12
19
GEM
@@ -273,21 +280,13 @@ GEM
273
280
simplecov-html (0.13.1 )
274
281
simplecov-lcov (0.8.0 )
275
282
simplecov_json_formatter (0.1.4 )
276
- sneakers (0.0.7 )
277
- bunny (>= 0.10.0 )
278
- serverengine
279
- thor
280
- thread
281
- sneakers_handlers (0.0.6 )
282
- sneakers
283
283
sorted_set (1.0.3 )
284
284
rbtree
285
285
set (~> 1.0 )
286
286
stringio (3.1.1 )
287
287
tainbox (2.1.2 )
288
288
activesupport
289
289
thor (1.3.2 )
290
- thread (0.2.2 )
291
290
timeout (0.4.1 )
292
291
tzinfo (2.0.6 )
293
292
concurrent-ruby (~> 1.0 )
@@ -313,6 +312,7 @@ DEPENDENCIES
313
312
rubocop-config-umbrellio
314
313
simplecov
315
314
simplecov-lcov
315
+ sneakers_handlers !
316
316
317
317
BUNDLED WITH
318
318
2.5.22
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ def app_name
61
61
end
62
62
63
63
def read_queue
64
- [ app_name , queue_suffix ] . compact . join ( "." )
64
+ [ app_name , queue_suffix ] . reject { | x | x . nil? || x . empty? } . join ( "." )
65
65
end
66
66
end
67
67
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def run(logger: Sneakers.logger)
28
28
29
29
Receiving ::Worker . from_queue (
30
30
Rabbit . config . read_queue ,
31
- handler : SneakersHandlers ::ExponentialBackoffHandler ,
31
+ handler : SneakersHandlers ::ExponentialBackoffHandler , # TODO: add config
32
32
max_retries : Rabbit . config . backoff_handler_max_retries ,
33
33
arguments : {
34
34
"x-dead-letter-exchange" => "#{ Rabbit . config . read_queue } .dlx" ,
Original file line number Diff line number Diff line change @@ -23,6 +23,5 @@ Gem::Specification.new do |spec|
23
23
spec . add_dependency "kicks" , "~> 3"
24
24
spec . add_dependency "lamian"
25
25
spec . add_dependency "rails" , ">= 6.1"
26
- spec . add_dependency "sneakers_handlers"
27
26
spec . add_dependency "tainbox"
28
27
end
Original file line number Diff line number Diff line change 104
104
describe "#read_queue" do
105
105
specify { expect ( Rabbit . config . read_queue ) . to eq ( "test_group_id.test_project_id" ) }
106
106
107
+ context "with nil suffix provided" do
108
+ before { Rabbit . config . queue_suffix = nil }
109
+
110
+ specify { expect ( Rabbit . config . read_queue ) . to eq ( "test_group_id.test_project_id" ) }
111
+ end
112
+
113
+ context "with blank suffix provided" do
114
+ before { Rabbit . config . queue_suffix = "" }
115
+
116
+ specify { expect ( Rabbit . config . read_queue ) . to eq ( "test_group_id.test_project_id" ) }
117
+ end
118
+
107
119
context "with suffix provided" do
108
120
before { Rabbit . config . queue_suffix = "smth" }
109
121
You can’t perform that action at this time.
0 commit comments