gitlab-org--gitlab-foss/lib/gitlab/sidekiq_middleware/request_store_middleware.rb

14 lines
246 B
Ruby
Raw Normal View History

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