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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-22 00:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-22 00:09:00 +0300
commit9fe1a4945b8db40c6b5d7b3ce7c6dbc93cdf67be (patch)
tree348efd8561338490a9f2c0c2a6bea91ef3bcd2de /lib/gitlab/usage
parent248492cc573e85aea19d7493c3a15d459be016c5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/usage')
-rw-r--r--lib/gitlab/usage/service_ping_report.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/gitlab/usage/service_ping_report.rb b/lib/gitlab/usage/service_ping_report.rb
index 1eda72ba570..3bc941260d6 100644
--- a/lib/gitlab/usage/service_ping_report.rb
+++ b/lib/gitlab/usage/service_ping_report.rb
@@ -9,7 +9,9 @@ module Gitlab
def for(output:, cached: false)
case output.to_sym
when :all_metrics_values
- with_instrumentation_classes(all_metrics_values(cached), :with_value)
+ Rails.cache.fetch(CACHE_KEY, force: !cached, expires_in: 2.weeks) do
+ with_instrumentation_classes(Gitlab::UsageData.data, :with_value)
+ end
when :metrics_queries
with_instrumentation_classes(metrics_queries, :with_instrumentation)
when :non_sql_metrics_values
@@ -27,12 +29,6 @@ module Gitlab
old_payload.with_indifferent_access.deep_merge(instrumented_payload)
end
- def all_metrics_values(cached)
- Rails.cache.fetch(CACHE_KEY, force: !cached, expires_in: 2.weeks) do
- Gitlab::UsageData.data
- end
- end
-
def metrics_queries
Gitlab::UsageDataQueries.data
end