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>2020-03-12 00:09:19 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-12 00:09:19 +0300
commitfca89bb73ff5b1d14c98c72481f9268fee107ea0 (patch)
treee1c8a2c4fe5df7f054fd09e49f53bcfb51e51c84 /lib/gitlab/usage_data.rb
parent76e9fc7b29c1ce716c26932e9fbec0f3c99f53f4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/usage_data.rb')
-rw-r--r--lib/gitlab/usage_data.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb
index 09ea1c49c22..35c69099b01 100644
--- a/lib/gitlab/usage_data.rb
+++ b/lib/gitlab/usage_data.rb
@@ -183,10 +183,8 @@ module Gitlab
# rubocop: disable CodeReuse/ActiveRecord
def services_usage
- service_counts = count(Service.active.where(template: false).where.not(type: 'JiraService').group(:type), fallback: Hash.new(-1), batch: false)
-
- results = Service.available_services_names.each_with_object({}) do |service_name, response|
- response["projects_#{service_name}_active".to_sym] = service_counts["#{service_name}_service".camelize] || 0
+ results = Service.available_services_names.without('jira').each_with_object({}) do |service_name, response|
+ response["projects_#{service_name}_active".to_sym] = count(Service.active.where(template: false, type: "#{service_name}_service".camelize))
end
# Keep old Slack keys for backward compatibility, https://gitlab.com/gitlab-data/analytics/issues/3241