Class: Courrier::Email::DeliveryJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- Courrier::Email::DeliveryJob
- Defined in:
- lib/courrier/email/delivery_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(email_class_name, **options) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/courrier/email/delivery_job.rb', line 6 def perform(email_class_name, **) Object.const_get(email_class_name).new(**).deliver_now.tap do ActiveSupport::Notifications.instrument("delivery.courrier", email: email_class_name, options: ) end rescue => exception ActiveSupport::Notifications.instrument("delivery_failed.courrier", email: email_class_name, options: , exception: [exception.class.name, exception.]) raise end |