diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /app/workers/new_note_worker.rb | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
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 |