diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 12:45:46 +0300 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /lib/gitlab/usage_data.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'lib/gitlab/usage_data.rb')
-rw-r--r-- | lib/gitlab/usage_data.rb | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index adf920d8b52..e66a565246b 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -41,13 +41,7 @@ module Gitlab include Gitlab::Utils::StrongMemoize include Gitlab::Usage::TimeFrame - def data(force_refresh: false) - Rails.cache.fetch('usage_data', force: force_refresh, expires_in: 2.weeks) do - uncached_data - end - end - - def uncached_data + def data clear_memoized with_finished_at(:recording_ce_finished_at) do @@ -55,10 +49,6 @@ module Gitlab end end - def to_json(force_refresh: false) - data(force_refresh: force_refresh).to_json - end - def license_usage_data { recorded_at: recorded_at, @@ -131,7 +121,6 @@ module Gitlab issues_created_manually_from_alerts: issues_created_manually_from_alerts, incident_issues: count(::Issue.incident, start: minimum_id(Issue), finish: maximum_id(Issue)), alert_bot_incident_issues: count(::Issue.authored(::User.alert_bot), start: minimum_id(Issue), finish: maximum_id(Issue)), - incident_labeled_issues: count(::Issue.with_label_attributes(::IncidentManagement::CreateIncidentLabelService::LABEL_PROPERTIES), start: minimum_id(Issue), finish: maximum_id(Issue)), keys: count(Key), label_lists: count(List.label), lfs_objects: count(LfsObject), |