Commit 812fcf35 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'am-remove-usage-data-uncached-data-method' into 'master'

Remove uncached_data from UsageData class

See merge request gitlab-org/gitlab!80071
parents def240c4 cd66c601
......@@ -53,6 +53,13 @@ module EE
class_methods do
extend ::Gitlab::Utils::Override
override :data
def data
with_finished_at(:recording_ee_finished_at) do
super
end
end
override :features_usage_data
def features_usage_data
super.merge(features_usage_data_ee)
......@@ -394,13 +401,6 @@ module EE
private
override :uncached_data
def uncached_data
with_finished_at(:recording_ee_finished_at) do
super
end
end
# rubocop:disable CodeReuse/ActiveRecord
# rubocop: disable UsageData/LargeTable
def count_secure_scans(time_period)
......
......@@ -7,7 +7,7 @@ module Gitlab
class Generator < ::Gitlab::UsageData
class << self
def generate(key_path)
uncached_data.deep_stringify_keys.dig(*key_path.split('.'))
data.deep_stringify_keys.dig(*key_path.split('.'))
end
def add_metric(metric, time_frame: 'none', options: {})
......
......@@ -42,7 +42,11 @@ module Gitlab
include Gitlab::Usage::TimeFrame
def data
uncached_data
clear_memoized
with_finished_at(:recording_ce_finished_at) do
usage_data_metrics
end
end
def license_usage_data
......@@ -683,14 +687,6 @@ module Gitlab
private
def uncached_data
clear_memoized
with_finished_at(:recording_ce_finished_at) do
usage_data_metrics
end
end
def stage_manage_events(time_period)
if time_period.empty?
Gitlab::Utils::UsageData::FALLBACK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment