2019-10-17 14:08:05 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-02-19 13:09:10 -05:00
|
|
|
class NewReleaseWorker # rubocop:disable Scalability/IdempotentWorker
|
2019-10-17 14:08:05 -04:00
|
|
|
include ApplicationWorker
|
|
|
|
|
|
|
|
queue_namespace :notifications
|
2019-10-18 07:11:44 -04:00
|
|
|
feature_category :release_orchestration
|
2020-01-24 13:09:00 -05:00
|
|
|
weight 2
|
2019-10-17 14:08:05 -04:00
|
|
|
|
|
|
|
def perform(release_id)
|
2019-10-31 23:06:26 -04:00
|
|
|
release = Release.preloaded.find_by_id(release_id)
|
2019-10-17 14:08:05 -04:00
|
|
|
return unless release
|
|
|
|
|
|
|
|
NotificationService.new.send_new_release_notifications(release)
|
|
|
|
end
|
|
|
|
end
|