DEV: Upgrade the Redis gem to v5.4

This commit is contained in:
Loïc Guitaut
2025-03-12 14:30:53 +01:00
committed by Loïc Guitaut
parent d4cbdf3ee0
commit 2ed31fea64
17 changed files with 67 additions and 68 deletions

View File

@ -1035,8 +1035,7 @@ module Discourse
Rails.logger.warn(warning)
begin
Discourse.redis.without_namespace.setex(redis_key, 3600, "x")
rescue Redis::CommandError => e
raise unless e.message =~ /READONLY/
rescue Redis::ReadOnlyError
end
end
warning
@ -1048,7 +1047,7 @@ module Discourse
GlobalSetting
.redis_config
.dup
.except(:connector, :replica_host, :replica_port)
.except(:client_implementation, :custom)
.tap { |config| config.merge!(db: config[:db].to_i + 1) unless old }
end