istox 0.1.152.debug.3 → 0.1.152.debug.4

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: bcb59445d311367d4f4ce3b0702a85010bfb1c7a80ebd937c25da5a5a7039875
4
- data.tar.gz: '08a888f035bdb17d693d1de490f040f7b5e8dbd6311c2c48f796d4895b159927'
3
+ metadata.gz: a0907cf089004ea6e884b60b6e2765733bec9cb922c3d714d6bdab0d55799a1d
4
+ data.tar.gz: 70e7bf9bfeef4e3e90fdd63ad156c02e6a028bdc589f3f47d013a46fba773b8d
5
5
  SHA512:
6
- metadata.gz: bdb3fb577cb7b5bedcbc02e31e394efd16dee95cead452665cdc8e08063674d97898f65e13a05b63b08666ccef811721593c5c00bb8689c254ba7aae56873f39
7
- data.tar.gz: b52b0494cfc649d5936327d087cde4b8e252ebf937a13d7cb9bc43cfaf72a9eb18322c9a15c46bdf014c0d67d205e1468a15412c8937143b268023b511a22ccc
6
+ metadata.gz: 84afbbe94d4ee7bb101a2628597f18fd7bb65180bd3c0b2a7ed89210ece6a39813c2e2b7585e64da1af02e336527153f8ccf37be3ab5e339803d75f8840d8919
7
+ data.tar.gz: 0c2a3133497107c862de09e2f99bd497cda18c9b4b801c9abb5a9f9177db323fef88a9d218021ac36d3a2ebf4dca2968562b0d284149a5c68a194e6997a3963e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- istox (0.1.152.debug.1)
4
+ istox (0.1.152.debug.3)
5
5
  awesome_print
6
6
  binding_of_caller
7
7
  bunny (>= 2.12.0)
@@ -59,8 +59,7 @@ module Istox
59
59
  Thread.new do
60
60
  loop do
61
61
  Thread.new do
62
- # sleep 60 * 5
63
- sleep 5
62
+ sleep 60 * 5
64
63
 
65
64
  tid = []
66
65
  Thread.list.each do |t|
@@ -112,39 +111,6 @@ module Istox
112
111
 
113
112
  log.info "Current @channel object is: #{@channel}"
114
113
 
115
- threadId = Thread.current.object_id
116
- # Start new thread on receiving ACK from 'confirm-1' channel on the specified thread
117
- Thread.new do
118
- log.info("Create thread #{Thread.current.object_id} for monitoring confirm-1")
119
- loop do
120
- sleep 5
121
- begin
122
- success = @channel[threadId]['confirm-1'].wait_for_confirms
123
- if success
124
- ::Istox::BunnyBoot.del_tracker_on_channel @channel[threadId]['confirm-1'].id
125
- else
126
- @channel[threadId]['confirm-1'].nacked_set.each do |n|
127
- log.info("Publish Error[Async #{threadId}]: UNACK delivery tag is #{n}, republish message")
128
- eid = ::Istox::BunnyBoot.find_tracker_on_channel @channel[threadId]['confirm-1'].id, n, 'eid'
129
- payload = ::Istox::BunnyBoot.find_tracker_on_channel @channel[threadId]['confirm-1'].id, n, 'payload'
130
- payload = JSON.parse(payload, :symbolize_names => true) unless payload.nil?
131
- options = ::Istox::BunnyBoot.find_tracker_on_channel @channel[threadId]['confirm-1'].id, n, 'options'
132
- options = JSON.parse(options, :symbolize_names => true) unless options.nil?
133
- if options.nil?
134
- routing_key = nil
135
- else
136
- routing_key = options.delete :routing_key
137
- options[:delivery_tag] = n
138
- end
139
- publish(exchange: eid, routing_key: routing_key, message: payload, options: options)
140
- end
141
- end
142
- rescue => e
143
- # log.debug "wait_for_confirm error happening: #{e}"
144
- end
145
- end
146
- end
147
-
148
114
  @channel[Thread.current.object_id]
149
115
  end
150
116
 
@@ -167,7 +133,8 @@ module Istox
167
133
 
168
134
  def channel_from_mode(mode)
169
135
  if mode == 0 || mode == 1
170
- channel["confirm-#{mode.to_s}"]
136
+ # Currently we use mode 0 only
137
+ channel["confirm-0"]
171
138
  else
172
139
  channel['noconfirm']
173
140
  end
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.1.152.debug.3'.freeze
2
+ VERSION = '0.1.152.debug.4'.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.152.debug.3
4
+ version: 0.1.152.debug.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng