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
path: root/lib
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-12-12 20:52:08 +0300
committerPawel Chojnacki <pawel@chojnacki.ws>2017-12-12 20:52:08 +0300
commitda19ce625ba8a0db9921fd85e331e70b14a5625b (patch)
tree180dff45ca0d10ee99ea70d452e38d193ecf5bc5 /lib
parentfd0a5168542f3a69815c99dc21f39587064f872d (diff)
Expire feature flag cache after 1minute
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/metrics/method_call.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/metrics/method_call.rb b/lib/gitlab/metrics/method_call.rb
index a844100e5a8..c58e54916e6 100644
--- a/lib/gitlab/metrics/method_call.rb
+++ b/lib/gitlab/metrics/method_call.rb
@@ -80,7 +80,7 @@ module Gitlab
def call_measurement_enabled?
expires_at = @@measurement_enabled_cache_expires_at.value
if expires_at < Time.now.to_i
- if @@measurement_enabled_cache_expires_at.compare_and_set(expires_at, (Time.now + 30.seconds).to_i)
+ if @@measurement_enabled_cache_expires_at.compare_and_set(expires_at, 1.minute.from_now.to_i)
@@measurement_enabled_cache.value = Feature.get(:prometheus_metrics_method_instrumentation).enabled?
end
end