Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/with_request_store.rb')
-rw-r--r--lib/gitlab/with_request_store.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/gitlab/with_request_store.rb b/lib/gitlab/with_request_store.rb
deleted file mode 100644
index d13cd9a72f7..00000000000
--- a/lib/gitlab/with_request_store.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-module Gitlab
- module WithRequestStore
- def with_request_store(&block)
- # Skip enabling the request store if it was already active. Whatever
- # instantiated the request store first is responsible for clearing it
- return yield if RequestStore.active?
-
- enabling_request_store(&block)
- end
-
- private
-
- def enabling_request_store
- RequestStore.begin!
- yield
- ensure
- RequestStore.end!
- RequestStore.clear!
- end
-
- extend self
- end
-end