diff options
Diffstat (limited to 'app/workers/new_note_worker.rb')
-rw-r--r-- | app/workers/new_note_worker.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/workers/new_note_worker.rb b/app/workers/new_note_worker.rb index e54d84e382e..ecc78236161 100644 --- a/app/workers/new_note_worker.rb +++ b/app/workers/new_note_worker.rb @@ -7,21 +7,19 @@ class NewNoteWorker # rubocop:disable Scalability/IdempotentWorker sidekiq_options retry: 3 - feature_category :issue_tracking + feature_category :team_planning urgency :high worker_resource_boundary :cpu weight 2 # Keep extra parameter to preserve backwards compatibility with # old `NewNoteWorker` jobs (can remove later) - # rubocop: disable CodeReuse/ActiveRecord def perform(note_id, _params = {}) - if note = Note.find_by(id: note_id) + if note = Note.find_by_id(note_id) NotificationService.new.new_note(note) unless note.skip_notification? Notes::PostProcessService.new(note).execute else Gitlab::AppLogger.error("NewNoteWorker: couldn't find note with ID=#{note_id}, skipping job") end end - # rubocop: enable CodeReuse/ActiveRecord end |