message_bus 4.4.0 → 4.4.1
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 +4 -4
- data/CHANGELOG +6 -0
- data/lib/message_bus/backends/redis.rb +10 -6
- data/lib/message_bus/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: c4a55e419b6f5807f46429d27360a776c8c8057d663188f1911aca78cb6198fc
|
4
|
+
data.tar.gz: dd96e8f87e10aca16262ca540997011871f0ba809a1153eb330aa82d8683267d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b62eacf519bc544cde94ac05683938c2ca4c98bfaeaefd79e99ac012864d4c0ac20412ccc9fd0910cdf122b2883841af24339d299101b35e7296c0faa60c103f
|
7
|
+
data.tar.gz: 44fb3cda5e137b61f35d5b0f1be204ab179594df59423948946ad4790b5b9bf3d8087be3aa55f819dfe9df6b65d3a30138312cc69a0726711bd65821789f459c
|
data/CHANGELOG
CHANGED
@@ -163,8 +163,8 @@ LUA
|
|
163
163
|
redis_channel_name,
|
164
164
|
],
|
165
165
|
)
|
166
|
-
rescue ::Redis::CommandError => e
|
167
|
-
if queue_in_memory && e
|
166
|
+
rescue ::Redis::ReadOnlyError, ::Redis::CommandError => e
|
167
|
+
if queue_in_memory && readonly_exception?(e)
|
168
168
|
@lock.synchronize do
|
169
169
|
@in_memory_backlog << [channel, data]
|
170
170
|
if @in_memory_backlog.length > @max_in_memory_publish_backlog
|
@@ -402,8 +402,8 @@ LUA
|
|
402
402
|
begin
|
403
403
|
# TODO recover special options
|
404
404
|
publish(*@in_memory_backlog[0], queue_in_memory: false)
|
405
|
-
rescue ::Redis::CommandError => e
|
406
|
-
if e
|
405
|
+
rescue ::Redis::ReadOnlyError, ::Redis::CommandError => e
|
406
|
+
if readonly_exception?(e)
|
407
407
|
try_again = true
|
408
408
|
else
|
409
409
|
@logger.warn(
|
@@ -445,11 +445,15 @@ LUA
|
|
445
445
|
pub_redis.disconnect!
|
446
446
|
pub_redis.set(key, "1")
|
447
447
|
false
|
448
|
-
rescue ::Redis::CommandError => e
|
449
|
-
true if e
|
448
|
+
rescue ::Redis::ReadOnlyError, ::Redis::CommandError => e
|
449
|
+
true if readonly_exception?(e)
|
450
450
|
end
|
451
451
|
end
|
452
452
|
|
453
|
+
def readonly_exception?(exception)
|
454
|
+
exception.is_a?(::Redis::ReadOnlyError) || (exception.is_a?(::Redis::CommandError) && exception.message =~ /^READONLY/)
|
455
|
+
end
|
456
|
+
|
453
457
|
MessageBus::BACKENDS[:redis] = self
|
454
458
|
end
|
455
459
|
end
|
data/lib/message_bus/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: message_bus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.4.
|
4
|
+
version: 4.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-20 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rack
|