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
5e63f450
Commit
5e63f450
authored
Jun 04, 2020
by
alinamihaila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename methods using _id
parent
f4e24934
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
ee/lib/ee/gitlab/usage_data.rb
ee/lib/ee/gitlab/usage_data.rb
+7
-7
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+8
-9
No files found.
ee/lib/ee/gitlab/usage_data.rb
View file @
5e63f450
...
...
@@ -256,15 +256,15 @@ module EE
projects_imported_from_github:
distinct_count
(
::
Project
.
github_imported
.
where
(
time_period
),
:creator_id
),
projects_with_repositories_enabled:
distinct_count
(
::
Project
.
with_repositories_enabled
.
where
(
time_period
),
:creator_id
,
start:
user_minimum
,
finish:
user_maximum
),
protected_branches:
distinct_count
(
::
Project
.
with_protected_branches
.
where
(
time_period
),
:creator_id
,
start:
user_minimum
,
finish:
user_maximum
),
start:
user_minimum
_id
,
finish:
user_maximum
_id
),
protected_branches:
distinct_count
(
::
Project
.
with_protected_branches
.
where
(
time_period
),
:creator_id
,
start:
user_minimum
_id
,
finish:
user_maximum_id
),
remote_mirrors:
distinct_count
(
::
Project
.
with_remote_mirrors
.
where
(
time_period
),
:creator_id
),
snippets:
distinct_count
(
::
Snippet
.
where
(
time_period
),
:author_id
),
suggestions:
distinct_count
(
::
Note
.
with_suggestions
.
where
(
time_period
),
:author_id
,
start:
user_minimum
,
finish:
user_maximum
)
start:
user_minimum
_id
,
finish:
user_maximum
_id
)
}
end
...
...
@@ -377,8 +377,8 @@ module EE
private
def
distinct_count_service_desk_enabled_projects
(
time_period
)
project_creator_id_start
=
user_minimum
project_creator_id_finish
=
user_maximum
project_creator_id_start
=
user_minimum
_id
project_creator_id_finish
=
user_maximum
_id
distinct_count
(
::
Project
.
service_desk_enabled
.
where
(
time_period
),
:creator_id
,
start:
project_creator_id_start
,
finish:
project_creator_id_finish
)
end
...
...
lib/gitlab/usage_data.rb
View file @
5e63f450
...
...
@@ -438,28 +438,27 @@ module Gitlab
end
end
<<<<<<<
HEAD
def
default_time_period
{
created_at:
28
.
days
.
ago
..
Time
.
current
}
=======
end
private
def
user_minimum
strong_memoize
(
:user_minimum
)
do
def
user_minimum
_id
strong_memoize
(
:user_minimum
_id
)
do
::
User
.
minimum
(
:id
)
end
end
def
user_maximum
strong_memoize
(
:user_maximum
)
do
def
user_maximum
_id
strong_memoize
(
:user_maximum
_id
)
do
::
User
.
maximum
(
:id
)
end
end
def
clear_memoized_limits
clear_memoization
(
:user_minimum
)
clear_memoization
(
:user_maximum
)
>>>>>>>
db9759262b7
...
Take
user
minimum
and
maximum
one
time
clear_memoization
(
:user_minimum_id
)
clear_memoization
(
:user_maximum_id
)
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