istox 0.1.122 → 0.1.123

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: b2ec2c5ce319ec743b9a544670ee7a9b88d9bcec272e6804225164bffd5fa169
4
- data.tar.gz: 9448bcab2ec166a6dbc20106634389e7823f9e68ae4b9e2b16fe3ce66adfc34d
3
+ metadata.gz: a9c603a12c2e306b53d71d8a403f2f74566674f0931b86a56108cac7bb147551
4
+ data.tar.gz: '08d22453d53b932195185a3f72c9bf130647b61c6e55693d019ed4fd32e151e5'
5
5
  SHA512:
6
- metadata.gz: 3b795bc2d296992bbcff25d7450b5988c3b366c1697062e3f9dfd2e47e4366e599ceeb943573d729165424ec15861e01a8afc027b526e70e3b86150391607319
7
- data.tar.gz: 80c81fab54f0516cf93af8afb9469ab61fc247e7813c90fd003f864c3bece24039c0b925d61d5fcee21940bf6158de54509e75229adb86970461740e289db996
6
+ metadata.gz: 70b8deac47ea641daddcf1753efb5755610d4ac801bac1071e9cfecaf2651029ae3526b80aede2c181845eecb946c072bc1013ad711a12896ca2674d88412755
7
+ data.tar.gz: e5b079847c9739f1568e492811b946150f56a39c51b909dc176ab512f102c6077a9bb68dddbece0876fe039a9b1761b04f8018a774cea1aa9cdf8ed037927301
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- istox (0.1.122)
4
+ istox (0.1.123)
5
5
  awesome_print
6
6
  binding_of_caller
7
7
  bunny (>= 2.12.0)
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.1.122'.freeze
2
+ VERSION = '0.1.123'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.122
4
+ version: 0.1.123
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng