diff options
Diffstat (limited to 'lib/gitlab/patch/sidekiq_poller.rb')
-rw-r--r-- | lib/gitlab/patch/sidekiq_poller.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/gitlab/patch/sidekiq_poller.rb b/lib/gitlab/patch/sidekiq_poller.rb new file mode 100644 index 00000000000..d4264cec1ab --- /dev/null +++ b/lib/gitlab/patch/sidekiq_poller.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Gitlab + module Patch + module SidekiqPoller + 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 |