summaryrefslogtreecommitdiff
path: root/lib/gitlab/patch/sidekiq_cron_poller.rb
blob: 56ca24c68f57fba3dd3608b4cf19a2821722de08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Gitlab
  module Patch
    module SidekiqCronPoller
      def enqueue
        Rails.application.reloader.wrap do
          ::Gitlab::WithRequestStore.with_request_store do
            super
          ensure
            ::Gitlab::Database::LoadBalancing.release_hosts
          end
        end
      end
    end
  end
end