Class: Decidim::Admin::NewsletterDeliveryJob
- Inherits:
-
ApplicationJob
- Object
- Decidim::ApplicationJob
- ApplicationJob
- Decidim::Admin::NewsletterDeliveryJob
- Defined in:
- app/jobs/decidim/admin/newsletter_delivery_job.rb
Overview
Custom ApplicationJob scoped to the admin panel.
Instance Method Summary collapse
Instance Method Details
#perform(user, newsletter) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'app/jobs/decidim/admin/newsletter_delivery_job.rb', line 10 def perform(user, ) NewsletterMailer.(user, ).deliver_now # rubocop:disable Rails/SkipsModelValidations .with_lock do .increment!(:total_deliveries) end # rubocop:enable Rails/SkipsModelValidations end |