redis: update library and use the recently added #ping method
All checks were successful
Invidious CI / build (push) Successful in 6m45s

This commit is contained in:
Fijxu 2025-04-13 15:35:34 -04:00
parent 0ce17d91eb
commit 3e33c9b70f
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4
2 changed files with 2 additions and 6 deletions

View file

@ -46,7 +46,7 @@ shards:
redis:
git: https://github.com/jgaskins/redis.git
version: 0.11.3
version: 0.12.0
spectator:
git: https://github.com/icy-arctic-fox/spectator.git

View file

@ -103,11 +103,7 @@ module Invidious::Database::Videos
@redis = Redis::Client.new(CONFIG.redis_url)
LOGGER.info "Video Cache: Using Redis compatible DB to store video cache"
LOGGER.info "Connecting to Redis compatible DB"
# #ping method is not available in this Redis library
# https://github.com/jgaskins/redis/issues/53
# if @redis.ping
if @redis.run({"PING"}) == "PONG"
# LOGGER.info "Connected to Redis compatible DB via unix domain socket at '#{CONFIG.redis_socket}'" if CONFIG.redis_socket
if @redis.ping
LOGGER.info "Connected to Redis compatible DB at '#{CONFIG.redis_url}'" if CONFIG.redis_url
end
end