Merge remote-tracking branch 'parent/main' into upstream-20240310
This commit is contained in:
commit
5979c0ea1d
345 changed files with 4304 additions and 2540 deletions
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Admin::DistributeAnnouncementNotificationWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(announcement_id)
|
||||
announcement = Announcement.find(announcement_id)
|
||||
|
||||
announcement.scope_for_notification.find_each do |user|
|
||||
UserMailer.announcement_published(user, announcement).deliver_later!
|
||||
end
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue