* Use active in place of sent on internal broadcast routes * Add and use active scope on broadcasts * Update seeds + specs to use active broadcasts * Add note about active broadcasts to /internal/broadcasts page
12 lines
367 B
Ruby
12 lines
367 B
Ruby
module Notifications
|
|
class WelcomeNotificationWorker
|
|
include Sidekiq::Worker
|
|
sidekiq_options queue: :low_priority, retry: 10
|
|
|
|
def perform(receiver_id, broadcast_id)
|
|
return unless (welcome_broadcast = Broadcast.active.find_by(id: broadcast_id))
|
|
|
|
Notifications::WelcomeNotification::Send.call(receiver_id, welcome_broadcast)
|
|
end
|
|
end
|
|
end
|