Class: Decidim::Meetings::SendCloseMeetingReminderJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(record) ⇒ Object



8
9
10
11
12
13
14
# File 'app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb', line 8

def perform(record)
  return if record.remindable.closed?

  ::Decidim::ReminderDelivery.create(reminder: record.reminder)
  ::Decidim::Meetings::CloseMeetingReminderMailer.close_meeting_reminder(record).deliver_now
  record.update(state: "completed")
end