f4aac77389
This significantly reduces the DB churn in the PostReceive task when it performs reference extraction. See #18663
13 lines
246 B
Ruby
13 lines
246 B
Ruby
module Gitlab
|
|
module SidekiqMiddleware
|
|
class RequestStoreMiddleware
|
|
def call(worker, job, queue)
|
|
RequestStore.begin!
|
|
yield
|
|
ensure
|
|
RequestStore.end!
|
|
RequestStore.clear!
|
|
end
|
|
end
|
|
end
|
|
end
|