diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-10-05 11:20:19 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-10-05 11:20:19 -0300 |
commit | 75ddf0d48d0fee6f9209376b0751d414946f9c67 (patch) | |
tree | 8cdb01f9b7da38c98eb0cf13f406295d9465b7bc /lib/feature.rb | |
parent | 88fa9a3c31d250ae9b88bb3250204b39eabc14b4 (diff) | |
download | gitlab-ce-75ddf0d48d0fee6f9209376b0751d414946f9c67.tar.gz |
Refactor Feature.flipper method
Diffstat (limited to 'lib/feature.rb')
-rw-r--r-- | lib/feature.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/feature.rb b/lib/feature.rb index 0e90ad9a333..a8324d99c10 100644 --- a/lib/feature.rb +++ b/lib/feature.rb @@ -72,7 +72,11 @@ class Feature end def flipper - @flipper ||= (Gitlab::SafeRequestStore[:flipper] ||= build_flipper_instance) + if Gitlab::SafeRequestStore.active? + Gitlab::SafeRequestStore[:flipper] ||= build_flipper_instance + else + @flipper ||= build_flipper_instance + end end def build_flipper_instance |