Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3490dbbd
Commit
3490dbbd
authored
Jul 15, 2020
by
Arturo Herrero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract min/max service id to improve performance
parent
15481fe9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+10
-1
No files found.
ee/lib/ee/gitlab/usage_data.rb
View file @
3490dbbd
...
...
@@ -195,7 +195,7 @@ module EE
super
.
merge
(
projects_jira_dvcs_cloud_active:
count
(
ProjectFeatureUsage
.
with_jira_dvcs_integration_enabled
),
projects_jira_dvcs_server_active:
count
(
ProjectFeatureUsage
.
with_jira_dvcs_integration_enabled
(
cloud:
false
)),
projects_jira_issuelist_active:
count
(
JiraService
.
active
.
includes
(
:jira_tracker_data
).
where
(
jira_tracker_data:
{
issues_enabled:
true
}))
# rubocop:disable CodeReuse/ActiveRecord
projects_jira_issuelist_active:
projects_jira_issuelist_active
)
end
...
...
@@ -346,6 +346,15 @@ module EE
def
ldap_available_servers
::
Gitlab
::
Auth
::
Ldap
::
Config
.
available_servers
end
# rubocop:disable CodeReuse/ActiveRecord
def
projects_jira_issuelist_active
min_id
=
JiraTrackerData
.
where
(
issues_enabled:
true
).
minimum
(
:service_id
)
max_id
=
JiraTrackerData
.
where
(
issues_enabled:
true
).
maximum
(
:service_id
)
count
(
JiraService
.
active
.
includes
(
:jira_tracker_data
).
where
(
jira_tracker_data:
{
issues_enabled:
true
}),
start:
min_id
,
finish:
max_id
)
end
# rubocop:enable CodeReuse/ActiveRecord
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment