summaryrefslogtreecommitdiff
path: root/lib/feature.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 01:45:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-19 01:45:44 +0000
commit85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch)
tree9160f299afd8c80c038f08e1545be119f5e3f1e1 /lib/feature.rb
parent15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff)
downloadgitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'lib/feature.rb')
-rw-r--r--lib/feature.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/feature.rb b/lib/feature.rb
index 7cf40b63fdf..71241e98723 100644
--- a/lib/feature.rb
+++ b/lib/feature.rb
@@ -18,6 +18,10 @@ class Feature
superclass.table_name = 'feature_gates'
end
+ class ActiveSupportCacheStoreAdapter < Flipper::Adapters::ActiveSupportCacheStore
+ # overrides methods in EE
+ end
+
InvalidFeatureFlagError = Class.new(Exception) # rubocop:disable Lint/InheritException
class << self
@@ -137,6 +141,12 @@ class Feature
Feature::Definition.load_all!
end
+ def register_hot_reloader
+ return unless check_feature_flags_definition?
+
+ Feature::Definition.register_hot_reloader!
+ end
+
private
def flipper
@@ -154,7 +164,7 @@ class Feature
# Redis L2 cache
redis_cache_adapter =
- Flipper::Adapters::ActiveSupportCacheStore.new(
+ ActiveSupportCacheStoreAdapter.new(
active_record_adapter,
l2_cache_backend,
expires_in: 1.hour)
@@ -231,4 +241,4 @@ class Feature
end
end
-Feature.prepend_if_ee('EE::Feature')
+Feature::ActiveSupportCacheStoreAdapter.prepend_if_ee('EE::Feature::ActiveSupportCacheStoreAdapter')