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
c6d7f014
Commit
c6d7f014
authored
Feb 06, 2020
by
Vitali Tatarintev
Committed by
Douglas Barbosa Alexandre
Feb 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move clear_prometheus_reactive_cache from EE to CE
parent
97e91853
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
app/models/concerns/prometheus_adapter.rb
app/models/concerns/prometheus_adapter.rb
+7
-0
ee/app/models/concerns/ee/prometheus_adapter.rb
ee/app/models/concerns/ee/prometheus_adapter.rb
+0
-8
No files found.
app/models/concerns/prometheus_adapter.rb
View file @
c6d7f014
...
@@ -58,5 +58,12 @@ module PrometheusAdapter
...
@@ -58,5 +58,12 @@ module PrometheusAdapter
def
build_query_args
(
*
args
)
def
build_query_args
(
*
args
)
args
.
map
{
|
arg
|
arg
.
respond_to?
(
:id
)
?
arg
.
id
:
arg
}
args
.
map
{
|
arg
|
arg
.
respond_to?
(
:id
)
?
arg
.
id
:
arg
}
end
end
def
clear_prometheus_reactive_cache!
(
query_name
,
*
args
)
query_class
=
query_klass_for
(
query_name
)
query_args
=
build_query_args
(
*
args
)
clear_reactive_cache!
(
query_class
.
name
,
*
query_args
)
end
end
end
end
end
ee/app/models/concerns/ee/prometheus_adapter.rb
View file @
c6d7f014
...
@@ -2,13 +2,5 @@
...
@@ -2,13 +2,5 @@
module
EE
module
EE
module
PrometheusAdapter
module
PrometheusAdapter
extend
::
Gitlab
::
Utils
::
Override
def
clear_prometheus_reactive_cache!
(
query_name
,
*
args
)
query_class
=
query_klass_for
(
query_name
)
query_args
=
build_query_args
(
*
args
)
clear_reactive_cache!
(
query_class
.
name
,
*
query_args
)
end
end
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