la_gear 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/la_gear/sneakers/exponential_backoff_handler.rb +2 -2
- data/lib/la_gear/version.rb +1 -1
- data/lib/la_gear/worker.rb +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db470921f1e099f90574aeb42b5c8c2464f6aa16
|
4
|
+
data.tar.gz: a9b0b52b5ea170056fd6c3af3bf83755cb757e15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2731e0cc12c396639feabae099dd0d36173f27e636f9a27d87a074972ced6c372d53a84a4b343655706bfd801de36ec62a09ffb434a605863b928f0d047bb70f
|
7
|
+
data.tar.gz: 71c8a55e8301f900878f6aee32da9f44434d962011aa13d2b56f5a1dc03cd8e964a9bdc9864a26db95937494aa06060590a7ec3ea56da01a5d5fc3ec04b140c4
|
@@ -9,7 +9,7 @@ Sneakers.configure(handler: LaGear::Sneakers::Handlers::ExponentialBackoff, work
|
|
9
9
|
Sneakers.logger.level = Logger::INFO
|
10
10
|
|
11
11
|
class ExponentialBackoffWorker
|
12
|
-
include Sneakers::Worker
|
12
|
+
include ::Sneakers::Worker
|
13
13
|
from_queue 'sneakers',
|
14
14
|
ack: true,
|
15
15
|
threads: 1,
|
@@ -35,5 +35,5 @@ messages.times { ExponentialBackoffWorker.enqueue("{}") }
|
|
35
35
|
|
36
36
|
puts "Done"
|
37
37
|
|
38
|
-
r = Sneakers::Runner.new([ExponentialBackoffWorker])
|
38
|
+
r = ::Sneakers::Runner.new([ExponentialBackoffWorker])
|
39
39
|
r.run
|
data/lib/la_gear/version.rb
CHANGED
data/lib/la_gear/worker.rb
CHANGED
@@ -9,7 +9,6 @@ module LaGear
|
|
9
9
|
else
|
10
10
|
base.include(::Sneakers::Worker) if base.respond_to?(:include)
|
11
11
|
base.extend(SneakersClassMethods)
|
12
|
-
Sneakers.logger.debug "#{}"
|
13
12
|
base.from_queue base.default_queue_name, base.default_queue_opts
|
14
13
|
end
|
15
14
|
base.include(::Sidekiq::Worker) if base.respond_to?(:include)
|
@@ -23,7 +22,7 @@ module LaGear
|
|
23
22
|
|
24
23
|
module SneakersClassMethods
|
25
24
|
def default_queue_name
|
26
|
-
"#{Sneakers::CONFIG.fetch(:app_name, 'sneakers_app').underscore}.#{routing_key}"
|
25
|
+
"#{::Sneakers::CONFIG.fetch(:app_name, 'sneakers_app').underscore}.#{routing_key}"
|
27
26
|
end
|
28
27
|
|
29
28
|
def default_queue_opts
|
@@ -46,7 +45,7 @@ module LaGear
|
|
46
45
|
end
|
47
46
|
|
48
47
|
def default_queue_args
|
49
|
-
{ 'x-dead-letter-exchange' => "#{Sneakers::CONFIG.fetch(:exchange, 'sneakers').underscore}.retry" }
|
48
|
+
{ 'x-dead-letter-exchange' => "#{::Sneakers::CONFIG.fetch(:exchange, 'sneakers').underscore}.retry" }
|
50
49
|
end
|
51
50
|
end
|
52
51
|
|