istox 0.1.122 → 0.1.123
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/istox/helpers/subscriber.rb +11 -12
- data/lib/istox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9c603a12c2e306b53d71d8a403f2f74566674f0931b86a56108cac7bb147551
|
4
|
+
data.tar.gz: '08d22453d53b932195185a3f72c9bf130647b61c6e55693d019ed4fd32e151e5'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70b8deac47ea641daddcf1753efb5755610d4ac801bac1071e9cfecaf2651029ae3526b80aede2c181845eecb946c072bc1013ad711a12896ca2674d88412755
|
7
|
+
data.tar.gz: e5b079847c9739f1568e492811b946150f56a39c51b909dc176ab512f102c6077a9bb68dddbece0876fe039a9b1761b04f8018a774cea1aa9cdf8ed037927301
|
data/Gemfile.lock
CHANGED
@@ -111,6 +111,17 @@ module Istox
|
|
111
111
|
sleep 2
|
112
112
|
end
|
113
113
|
|
114
|
+
# Initiate klass
|
115
|
+
ruby_class = ::Istox::BunnyBoot.ruby_class consumer_key
|
116
|
+
klass = Object.const_get(
|
117
|
+
'::' + (ruby_class.nil? ? "#{consumer_key.to_s.underscore}_consumer" : ruby_class).camelize
|
118
|
+
)
|
119
|
+
if suffix.nil?
|
120
|
+
worker = klass.new
|
121
|
+
else
|
122
|
+
worker = klass.new suffix
|
123
|
+
end
|
124
|
+
|
114
125
|
# Subscribe queue
|
115
126
|
queue.subscribe manual_ack: manual_ack do |delivery_info, metadata, payload|
|
116
127
|
log.debug "Delivery_info: #{delivery_info}"
|
@@ -126,18 +137,6 @@ module Istox
|
|
126
137
|
processing_paylod = JSON.parse(payload)
|
127
138
|
payload_object = ::Istox::CommonHelper.to_open_struct(processing_paylod)
|
128
139
|
|
129
|
-
ruby_class = ::Istox::BunnyBoot.ruby_class consumer_key
|
130
|
-
log.debug "#{'::' + (ruby_class.nil? ? "#{consumer_key.to_s.underscore}_consumer" : ruby_class).camelize}"
|
131
|
-
klass = Object.const_get(
|
132
|
-
'::' + (ruby_class.nil? ? "#{consumer_key.to_s.underscore}_consumer" : ruby_class).camelize
|
133
|
-
)
|
134
|
-
|
135
|
-
if suffix.nil?
|
136
|
-
worker = klass.new
|
137
|
-
else
|
138
|
-
worker = klass.new suffix
|
139
|
-
end
|
140
|
-
|
141
140
|
log.info "Processing in consumer: #{klass}, paylod: #{payload_object.to_h.inspect}"
|
142
141
|
|
143
142
|
result = worker.process(payload_object, metadata, delivery_info)
|
data/lib/istox/version.rb
CHANGED