summaryrefslogtreecommitdiff
path: root/app/workers/new_release_worker.rb
blob: 3c19e5f3d2b7f65fabbc29c6527a7cf5b3119458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class NewReleaseWorker # rubocop:disable Scalability/IdempotentWorker
  include ApplicationWorker

  queue_namespace :notifications
  feature_category :release_orchestration
  weight 2

  def perform(release_id)
    release = Release.preloaded.find_by_id(release_id)
    return unless release

    NotificationService.new.send_new_release_notifications(release)
  end
end