redis: update library and use the recently added #ping method
All checks were successful
Invidious CI / build (push) Successful in 6m45s
All checks were successful
Invidious CI / build (push) Successful in 6m45s
This commit is contained in:
parent
0ce17d91eb
commit
3e33c9b70f
2 changed files with 2 additions and 6 deletions
|
@ -46,7 +46,7 @@ shards:
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
git: https://github.com/jgaskins/redis.git
|
git: https://github.com/jgaskins/redis.git
|
||||||
version: 0.11.3
|
version: 0.12.0
|
||||||
|
|
||||||
spectator:
|
spectator:
|
||||||
git: https://github.com/icy-arctic-fox/spectator.git
|
git: https://github.com/icy-arctic-fox/spectator.git
|
||||||
|
|
|
@ -103,11 +103,7 @@ module Invidious::Database::Videos
|
||||||
@redis = Redis::Client.new(CONFIG.redis_url)
|
@redis = Redis::Client.new(CONFIG.redis_url)
|
||||||
LOGGER.info "Video Cache: Using Redis compatible DB to store video cache"
|
LOGGER.info "Video Cache: Using Redis compatible DB to store video cache"
|
||||||
LOGGER.info "Connecting to Redis compatible DB"
|
LOGGER.info "Connecting to Redis compatible DB"
|
||||||
# #ping method is not available in this Redis library
|
if @redis.ping
|
||||||
# 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
|
|
||||||
LOGGER.info "Connected to Redis compatible DB at '#{CONFIG.redis_url}'" if CONFIG.redis_url
|
LOGGER.info "Connected to Redis compatible DB at '#{CONFIG.redis_url}'" if CONFIG.redis_url
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue