Commit 0c58eb64 authored by Ahmad Sherif's avatar Ahmad Sherif
Browse files

Bail-out quickly from a timeout error

parent f54dd797
Pipeline #24345 passed with stage
in 53 seconds
PATH
remote: .
specs:
gitlab-monitor (0.0.20)
gitlab-monitor (0.0.21)
pg (~> 0.18.4)
quantile (~> 0.2.0)
redis-namespace (~> 1.5.2)
......
......@@ -15,7 +15,7 @@ module GitLab
@metrics = metrics
Sidekiq.configure_client do |config|
config.redis = { url: opts[:redis_url], namespace: "resque:gitlab" }
config.redis = { url: opts[:redis_url], namespace: "resque:gitlab", connect_timeout: 1 }
end
ensure_queue_job_stats_script_loaded
......@@ -103,7 +103,7 @@ module GitLab
end
true
end
rescue Redis::CannotConnectError # rubocop:disable Lint/HandleExceptions
rescue Redis::CannotConnectError, Redis::TimeoutError # rubocop:disable Lint/HandleExceptions
# Maybe we're trying connecting to a slave
end
......
module GitLab
module Monitor
VERSION = "0.0.20".freeze
VERSION = "0.0.21".freeze
end
end
Markdown is supported
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