From 3e33c9b70faff5e7c5f2778c3473d29f7ad4a6d1 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Sun, 13 Apr 2025 15:35:34 -0400 Subject: [PATCH] redis: update library and use the recently added #ping method --- shard.lock | 2 +- src/invidious/database/videos.cr | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/shard.lock b/shard.lock index 13636f78..7018b2b0 100644 --- a/shard.lock +++ b/shard.lock @@ -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 diff --git a/src/invidious/database/videos.cr b/src/invidious/database/videos.cr index 8c1fee36..30b5a05f 100644 --- a/src/invidious/database/videos.cr +++ b/src/invidious/database/videos.cr @@ -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