From 85dc423f7090da0a52c73eb66faf22ddb20efff9 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 19 Sep 2020 01:45:44 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-4-stable-ee --- lib/feature.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/feature.rb') 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') -- cgit v1.2.3