2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
module Gitlab
|
|
|
|
module SidekiqMiddleware
|
|
|
|
class RequestStoreMiddleware
|
|
|
|
def call(worker, job, queue)
|
|
|
|
RequestStore.begin!
|
|
|
|
yield
|
|
|
|
ensure
|
|
|
|
RequestStore.end!
|
|
|
|
RequestStore.clear!
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|