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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
90edcb45
Commit
90edcb45
authored
Nov 07, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make BackgroundTransaction#labels public
as are all other Transaction implementations
parent
b16c2ef7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
lib/gitlab/metrics/background_transaction.rb
lib/gitlab/metrics/background_transaction.rb
+0
-2
spec/lib/gitlab/metrics/background_transaction_spec.rb
spec/lib/gitlab/metrics/background_transaction_spec.rb
+6
-0
No files found.
lib/gitlab/metrics/background_transaction.rb
View file @
90edcb45
...
...
@@ -6,8 +6,6 @@ module Gitlab
@worker_class
=
worker_class
end
protected
def
labels
{
controller:
@worker_class
.
name
,
action:
'perform'
}
end
...
...
spec/lib/gitlab/metrics/background_transaction_spec.rb
View file @
90edcb45
...
...
@@ -10,4 +10,10 @@ describe Gitlab::Metrics::BackgroundTransaction do
expect
(
subject
.
action
).
to
eq
(
'TestWorker#perform'
)
end
end
describe
'#label'
do
it
'returns labels based on class name'
do
expect
(
subject
.
labels
).
to
eq
(
controller:
'TestWorker'
,
action:
'perform'
)
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