Unverified Commit 48a2ec81 authored by Craig Miskell's avatar Craig Miskell
Browse files

Remove final mentions of the LUA script

This also means we need to change the basic 'is this thing on?' connection check.  PING is the usual suspect.  Note that this is *not* an 'adminstrative' command in the context of 'redis-namespace', so we can go direct to 'conn' and remove the scary comment
parent a7ecb469
remote: . remote: .
specs: specs:
gitlab-exporter (11.0.0) gitlab-exporter (11.0.1)
connection_pool (= 2.2.5) connection_pool (= 2.2.5)
pg (= 1.2.3) pg (= 1.2.3)
puma (= 5.3.2) puma (= 5.3.2)
...@@ -189,14 +189,9 @@ module GitLab ...@@ -189,14 +189,9 @@ module GitLab
def connected? def connected?
return @connected unless @connected.nil? return @connected unless @connected.nil?
# This is also a good "connected check"
Sidekiq.redis do |conn| Sidekiq.redis do |conn|
# Using administrative commands on conn directly (which is a Redis::Namespace) @connected = (conn.ping == "PONG")
# will be removed in redis-namespace 2.0.
conn.redis.script(:load, QUEUE_JOB_STATS_SCRIPT) unless conn.redis.script(:exists, QUEUE_JOB_STATS_SHA)
end end
@connected = true
rescue Redis::BaseConnectionError => e rescue Redis::BaseConnectionError => e
@logger&.error "Error connecting to the Redis: #{e}" @logger&.error "Error connecting to the Redis: #{e}"
@connected = false @connected = false
module GitLab module GitLab
module Exporter module Exporter
VERSION = "11.0.0".freeze VERSION = "11.0.1".freeze
end end
end end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment