rabbitek 0.4.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88da1d0bb088947a715798f972002cef412c4f655c806934f12aba6aed018701
|
4
|
+
data.tar.gz: 898fda5b61e8fa03ff97408323ebdd1170ebcbcd727e65ba8bfd34acab411d02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bcc83ff5c083038d11b0b1116c6a97ee36c5b0a813cae2ad00f42e25743b5b4b700f2b4b12dab4847dc28b0d7a83e0a69d39bb483538672ca1acb2ed4be9f5b
|
7
|
+
data.tar.gz: 3a8493c542296cc7ab0bdb8db027fd216ed8861445d421003773211ccc29ede81f4c1995f787f862eb1f4fbc01dc3466f5ef0c901f112de872a4df8a0d422236
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rabbitek (0.4.
|
4
|
+
rabbitek (0.4.1)
|
5
5
|
activesupport (> 3.0)
|
6
6
|
bunny (~> 2.11.0)
|
7
|
-
oj (
|
7
|
+
oj (> 2.0.0)
|
8
8
|
opentracing (~> 0.4)
|
9
9
|
slop (~> 4.0)
|
10
10
|
yabeda
|
@@ -85,7 +85,7 @@ GEM
|
|
85
85
|
nio4r (2.5.2)
|
86
86
|
nokogiri (1.10.7)
|
87
87
|
mini_portile2 (~> 2.4.0)
|
88
|
-
oj (3.10.
|
88
|
+
oj (3.10.2)
|
89
89
|
opentracing (0.5.0)
|
90
90
|
parallel (1.12.1)
|
91
91
|
parser (2.5.1.2)
|
@@ -145,7 +145,7 @@ GEM
|
|
145
145
|
ruby-progressbar (~> 1.7)
|
146
146
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
147
147
|
ruby-progressbar (1.10.0)
|
148
|
-
slop (4.
|
148
|
+
slop (4.8.0)
|
149
149
|
sprockets (4.0.0)
|
150
150
|
concurrent-ruby (~> 1.0)
|
151
151
|
rack (> 1, < 3)
|
@@ -161,7 +161,7 @@ GEM
|
|
161
161
|
websocket-driver (0.7.1)
|
162
162
|
websocket-extensions (>= 0.1.0)
|
163
163
|
websocket-extensions (0.1.4)
|
164
|
-
yabeda (0.
|
164
|
+
yabeda (0.5.0)
|
165
165
|
concurrent-ruby
|
166
166
|
dry-initializer
|
167
167
|
|
@@ -52,16 +52,16 @@ module Rabbitek
|
|
52
52
|
Message.new(delivery_info: delivery_info, properties: properties, payload: payload)
|
53
53
|
end
|
54
54
|
|
55
|
-
def
|
56
|
-
self.class.
|
55
|
+
def opts
|
56
|
+
self.class.opts
|
57
57
|
end
|
58
58
|
|
59
59
|
module ClassMethods # rubocop:disable Style/Documentation
|
60
|
-
attr_accessor :rabbit_options_hash, :
|
60
|
+
attr_accessor :rabbit_options_hash, :opts
|
61
61
|
|
62
62
|
def rabbit_options(opts)
|
63
63
|
self.rabbit_options_hash = default_rabbit_options(opts).with_indifferent_access.merge(opts)
|
64
|
-
self.
|
64
|
+
self.opts = opts
|
65
65
|
end
|
66
66
|
|
67
67
|
def perform_async(payload, opts: {}, channel: nil)
|
@@ -33,7 +33,7 @@ module Rabbitek
|
|
33
33
|
def_delegators :starter, :channel, :work_queue, :retry_or_delayed_queue, :retry_or_delayed_exchange
|
34
34
|
|
35
35
|
def run_job(modified_consumer, message)
|
36
|
-
if modified_consumer.
|
36
|
+
if modified_consumer.opts[:batch]
|
37
37
|
run_job_batched(modified_consumer, message)
|
38
38
|
else
|
39
39
|
modified_consumer.perform(message)
|
@@ -44,7 +44,7 @@ module Rabbitek
|
|
44
44
|
def run_job_batched(modified_consumer, message)
|
45
45
|
Batcher.new(modified_consumer).perform(message) do |batch|
|
46
46
|
modified_consumer.perform(batch)
|
47
|
-
modified_consumer.ack!(batch.last.delivery_info, true)
|
47
|
+
modified_consumer.ack!(batch.last.delivery_info, true) unless modified_consumer.opts[:batch][:manual_ack]
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
data/lib/rabbitek/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbitek
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boostcom
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|