diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 21:09:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-25 21:09:02 +0300 |
commit | 951616a26a61e880860ad862c1d45a8e3762b4bc (patch) | |
tree | ed6fe722e955aff38e13ca02d2aa7fdd4239c863 /lib/gitlab/with_request_store.rb | |
parent | e06d0e779673d745972863302858105aad9032e5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/with_request_store.rb')
-rw-r--r-- | lib/gitlab/with_request_store.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/gitlab/with_request_store.rb b/lib/gitlab/with_request_store.rb new file mode 100644 index 00000000000..d6c05e1e256 --- /dev/null +++ b/lib/gitlab/with_request_store.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Gitlab + module WithRequestStore + def with_request_store + RequestStore.begin! + yield + ensure + RequestStore.end! + RequestStore.clear! + end + end +end |