gitlab-org--gitlab-foss/lib/gitlab/sidekiq_versioning.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
584 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
2017-11-28 16:16:50 +00:00
module Gitlab
module SidekiqVersioning
def self.install!
# The Sidekiq client API always adds the queue to the Sidekiq queue
# list, but mail_room and gitlab-shell do not. This is only necessary
# for monitoring.
queues = SidekiqConfig.worker_queues
2017-11-28 16:16:50 +00:00
if queues.any?
Sidekiq.redis do |conn|
conn.sadd('queues', queues)
2017-11-28 16:16:50 +00:00
end
end
rescue ::Redis::BaseError, SocketError, Errno::ENOENT, Errno::EADDRNOTAVAIL, Errno::EAFNOSUPPORT, Errno::ECONNRESET, Errno::ECONNREFUSED
2017-11-28 16:16:50 +00:00
end
end
end