Welcome to mirror list, hosted at ThFree Co, Russian Federation.

new_note_worker.rb « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 67c54fbf10e05a127386c8129bd7cdc02fbd19ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class NewNoteWorker
  include ApplicationWorker

  # Keep extra parameter to preserve backwards compatibility with
  # old `NewNoteWorker` jobs (can remove later)
  def perform(note_id, _params = {})
    if note = Note.find_by(id: note_id)
      NotificationService.new.new_note(note)
      Notes::PostProcessService.new(note).execute
    else
      Rails.logger.error("NewNoteWorker: couldn't find note with ID=#{note_id}, skipping job")
    end
  end
end