debian-mirror-gitlab/lib/gitlab/sidekiq_middleware/request_store_middleware.rb
2018-12-23 12:14:25 +05:30

15 lines
277 B
Ruby

# frozen_string_literal: true
module Gitlab
module SidekiqMiddleware
class RequestStoreMiddleware
def call(worker, job, queue)
RequestStore.begin!
yield
ensure
RequestStore.end!
RequestStore.clear!
end
end
end
end