bunny-publisher 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3285bb8050efb8421bb572040231fa85c1b12ee7bcd3cda02af8649101559ce6
4
- data.tar.gz: f00f996623c6d099cf405f9555b5cbf437b67ad65aeb34ea2722bc3235492388
3
+ metadata.gz: 5c083b8200bdbe3d30cb2672065e3529c1e1dc78f82514f8d694f83419df279b
4
+ data.tar.gz: 38c13c753e4bceeb6f26d344ab050769a874201fb262b47104005bfed3b22466
5
5
  SHA512:
6
- metadata.gz: a0148e4c6275e4983b9853a8f12d1e38d1f9eb97c57ed4f4d0adbbb8a071638fa0998544d908ead27841d1b513bc11e284ddd83efe37f9d0d3f1302476f900c2
7
- data.tar.gz: 0de5b4d2f9e9cc53c5da44582548b387b7939e8a23d45014bfe7a6868ec98c580c434bc65792790fdfe932ef671667acff2ec0eb2a5c7610e3d2eff014045c5f
6
+ metadata.gz: 1db69e62d8f38eb35b3a625233af35304ddbeb5ce9af02c3fb162e559813267f3b465dd48e54547a57d1ec9e988d57483e1c03a878b883dab699b14f0588dd43
7
+ data.tar.gz: 462fc949e57fcc820e1486a86e4a216229c2bbe2a15792563e1dc45435f97e179cc1d6663f9fbd92a5c74417179631bf87ebadb2e5b674732e39df7d23342681
data/CHANGELOG.md CHANGED
@@ -1 +1,5 @@
1
+ ## Changes Between 0.1.0 and 0.1.1
2
+
3
+ Minor improvements of unrouted message processing at program exit.
4
+
1
5
  ## Original Release: 0.1.0
@@ -91,7 +91,7 @@ module BunnyPublisher
91
91
  end
92
92
 
93
93
  def on_message_return(return_info, properties, message)
94
- @unrouted_message = true
94
+ @unrouted_message_processing = true
95
95
 
96
96
  ensure_message_is_unrouted!(return_info, properties, message)
97
97
 
@@ -103,8 +103,9 @@ module BunnyPublisher
103
103
  end
104
104
  run_callback(:after_republish, return_info, properties, message)
105
105
 
106
- @unrouted_message = false
107
106
  result
107
+ ensure
108
+ @unrouted_message_processing = false
108
109
  end
109
110
 
110
111
  def setup_queue_for_republish(return_info, properties, message)
@@ -130,13 +131,13 @@ module BunnyPublisher
130
131
  def wait_for_unrouted_messages_processing(timeout:)
131
132
  sleep(0.05) # gives exchange some time to receive retuned message
132
133
 
133
- return unless @unrouted_message
134
+ return unless @unrouted_message_processing
134
135
 
135
136
  puts("Waiting up to #{timeout} seconds for unrouted messages handling")
136
137
 
137
- Timeout.timeout(timeout) { sleep 0.01 while @unrouted_message }
138
+ Timeout.timeout(timeout) { sleep 0.01 while @unrouted_message_processing }
138
139
  rescue Timeout::Error
139
- puts('Some unrouted messages are lost on process exit!')
140
+ warn('Some unrouted messages are lost on process exit!')
140
141
  end
141
142
  end
142
143
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BunnyPublisher
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunny-publisher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rustam Sharshenov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-20 00:00:00.000000000 Z
11
+ date: 2020-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny