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
076db527
Commit
076db527
authored
Jul 07, 2020
by
alinamihaila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear memoized issue min and max id
parent
21061935
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
lib/gitlab/usage_data.rb
lib/gitlab/usage_data.rb
+2
-0
spec/lib/gitlab/usage_data_spec.rb
spec/lib/gitlab/usage_data_spec.rb
+8
-0
No files found.
lib/gitlab/usage_data.rb
View file @
076db527
...
...
@@ -574,6 +574,8 @@ module Gitlab
end
def
clear_memoized
clear_memoization
(
:issue_minimum_id
)
clear_memoization
(
:issue_maximum_id
)
clear_memoization
(
:user_minimum_id
)
clear_memoization
(
:user_maximum_id
)
clear_memoization
(
:unique_visit_service
)
...
...
spec/lib/gitlab/usage_data_spec.rb
View file @
076db527
...
...
@@ -17,6 +17,14 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect
(
described_class
.
uncached_data
).
to
include
(
:usage_activity_by_stage_monthly
)
end
it
'clears memoized values'
do
%i(issue_minimum_id issue_maximum_id user_minimum_id user_maximum_id unique_visit_service)
.
each
do
|
key
|
expect
(
described_class
).
to
receive
(
:clear_memoization
).
with
(
key
)
end
described_class
.
uncached_data
end
context
'for configure'
do
it
'includes accurate usage_activity_by_stage data'
do
for_defined_days_back
do
...
...
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