Sha256: 00e70fc1c086137076252f9a126cd4bdd098128406c34bcb532fe9e4113b32e7

Contents?: true

Size: 469 Bytes

Versions: 25

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Meetings
    class SendCloseMeetingReminderJob < ApplicationJob
      queue_as :close_meeting_reminder

      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
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-meetings-0.29.1 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.28.4 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.27.9 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.29.0 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.28.3 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.27.8 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.29.0.rc4 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.29.0.rc3 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.29.0.rc2 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.29.0.rc1 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.28.2 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.27.7 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.28.1 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.27.6 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.28.0 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.27.5 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.28.0.rc5 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.28.0.rc4 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.27.4 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb
decidim-meetings-0.27.3 app/jobs/decidim/meetings/send_close_meeting_reminder_job.rb