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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/bunny_publisher/mandatory.rb +6 -5
- data/lib/bunny_publisher/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c083b8200bdbe3d30cb2672065e3529c1e1dc78f82514f8d694f83419df279b
|
4
|
+
data.tar.gz: 38c13c753e4bceeb6f26d344ab050769a874201fb262b47104005bfed3b22466
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1db69e62d8f38eb35b3a625233af35304ddbeb5ce9af02c3fb162e559813267f3b465dd48e54547a57d1ec9e988d57483e1c03a878b883dab699b14f0588dd43
|
7
|
+
data.tar.gz: 462fc949e57fcc820e1486a86e4a216229c2bbe2a15792563e1dc45435f97e179cc1d6663f9fbd92a5c74417179631bf87ebadb2e5b674732e39df7d23342681
|
data/CHANGELOG.md
CHANGED
@@ -91,7 +91,7 @@ module BunnyPublisher
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def on_message_return(return_info, properties, message)
|
94
|
-
@
|
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 @
|
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 @
|
138
|
+
Timeout.timeout(timeout) { sleep 0.01 while @unrouted_message_processing }
|
138
139
|
rescue Timeout::Error
|
139
|
-
|
140
|
+
warn('Some unrouted messages are lost on process exit!')
|
140
141
|
end
|
141
142
|
end
|
142
143
|
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.
|
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-
|
11
|
+
date: 2020-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|