debian-mirror-gitlab/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 Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
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.
2021-11-18 22:05:49 +05:30
queues = SidekiqConfig.worker_queues
2018-03-17 18:26:18 +05:30
2021-11-18 22:05:49 +05:30
if queues.any?
Sidekiq.redis do |conn|
2022-10-11 01:57:18 +05:30
conn.sadd('queues', queues)
2018-03-17 18:26:18 +05:30
end
end
2021-11-18 22:05:49 +05:30
rescue ::Redis::BaseError, SocketError, Errno::ENOENT, Errno::EADDRNOTAVAIL, Errno::EAFNOSUPPORT, Errno::ECONNRESET, Errno::ECONNREFUSED
2018-03-17 18:26:18 +05:30
end
end
end