2019-10-17 18:08:05 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class NewReleaseWorker
|
|
|
|
include ApplicationWorker
|
|
|
|
|
|
|
|
queue_namespace :notifications
|
2019-10-18 11:11:44 +00:00
|
|
|
feature_category :release_orchestration
|
2020-01-24 18:09:00 +00:00
|
|
|
weight 2
|
2019-10-17 18:08:05 +00:00
|
|
|
|
|
|
|
def perform(release_id)
|
2019-11-01 03:06:26 +00:00
|
|
|
release = Release.preloaded.find_by_id(release_id)
|
2019-10-17 18:08:05 +00:00
|
|
|
return unless release
|
|
|
|
|
|
|
|
NotificationService.new.send_new_release_notifications(release)
|
|
|
|
end
|
|
|
|
end
|