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
eb985075
Commit
eb985075
authored
May 21, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
May 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use applogger in new note worker
parent
11271ac4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
app/workers/new_note_worker.rb
app/workers/new_note_worker.rb
+1
-1
changelogs/unreleased/rails-logger-cop-23.yml
changelogs/unreleased/rails-logger-cop-23.yml
+5
-0
spec/workers/new_note_worker_spec.rb
spec/workers/new_note_worker_spec.rb
+1
-1
No files found.
app/workers/new_note_worker.rb
View file @
eb985075
...
...
@@ -16,7 +16,7 @@ class NewNoteWorker # rubocop:disable Scalability/IdempotentWorker
NotificationService
.
new
.
new_note
(
note
)
unless
skip_notification?
(
note
)
Notes
::
PostProcessService
.
new
(
note
).
execute
else
Rails
.
logger
.
error
(
"NewNoteWorker: couldn't find note with ID=
#{
note_id
}
, skipping job"
)
# rubocop:disable Gitlab/RailsLogger
Gitlab
::
AppLogger
.
error
(
"NewNoteWorker: couldn't find note with ID=
#{
note_id
}
, skipping job"
)
end
end
...
...
changelogs/unreleased/rails-logger-cop-23.yml
0 → 100644
View file @
eb985075
---
title
:
Use applogger in new note worker
merge_request
:
32213
author
:
Rajendra Kadam
type
:
fixed
spec/workers/new_note_worker_spec.rb
View file @
eb985075
...
...
@@ -27,7 +27,7 @@ describe NewNoteWorker do
let
(
:unexistent_note_id
)
{
non_existing_record_id
}
it
'logs NewNoteWorker process skipping'
do
expect
(
Rails
.
l
ogger
).
to
receive
(
:error
)
expect
(
Gitlab
::
AppL
ogger
).
to
receive
(
:error
)
.
with
(
"NewNoteWorker: couldn't find note with ID=
#{
unexistent_note_id
}
, skipping job"
)
described_class
.
new
.
perform
(
unexistent_note_id
)
...
...
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