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
48b75ece
Commit
48b75ece
authored
Mar 17, 2022
by
Piotr Skorupa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor rake task
parent
a75b5a28
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
lib/tasks/gitlab/usage_data.rake
lib/tasks/gitlab/usage_data.rake
+3
-1
No files found.
lib/tasks/gitlab/usage_data.rake
View file @
48b75ece
...
@@ -53,11 +53,13 @@ namespace :gitlab do
...
@@ -53,11 +53,13 @@ namespace :gitlab do
desc
'GitLab | UsageDataMetrics | Generate raw SQL metrics queries fixture for RSpec'
desc
'GitLab | UsageDataMetrics | Generate raw SQL metrics queries fixture for RSpec'
task
generate_sql_metrics_fixture: :environment
do
task
generate_sql_metrics_fixture: :environment
do
path
=
Rails
.
root
.
join
(
'spec/fixtures/lib/gitlab/usage/sql_metrics_queries.json'
)
queries
=
Timecop
.
freeze
(
2021
,
1
,
1
)
do
queries
=
Timecop
.
freeze
(
2021
,
1
,
1
)
do
Gitlab
::
Usage
::
ServicePingReport
.
for
(
output: :metrics_queries
)
Gitlab
::
Usage
::
ServicePingReport
.
for
(
output: :metrics_queries
)
end
end
File
.
write
(
'spec/fixtures/lib/gitlab/usage/sql_metrics_queries.json'
,
Gitlab
::
Json
.
pretty_generate
(
queries
))
File
.
write
(
path
,
Gitlab
::
Json
.
pretty_generate
(
queries
))
end
end
def
ci_template_includes_hash
(
source
,
template_directory
=
nil
)
def
ci_template_includes_hash
(
source
,
template_directory
=
nil
)
...
...
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