Class: DelayedMailhopper::SendJob
- Inherits:
-
Struct
- Object
- Struct
- DelayedMailhopper::SendJob
- Defined in:
- app/models/delayed_mailhopper/send_job.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
2 3 4 |
# File 'app/models/delayed_mailhopper/send_job.rb', line 2 def id @id end |
Instance Method Details
#error(job, e) ⇒ Object
11 12 13 14 |
# File 'app/models/delayed_mailhopper/send_job.rb', line 11 def error(job, e) Rails::logger.error "[DelayedMailhopper::SendJob] error for email_id #{id}, delayed_job_id #{job.id}\n" + "#{e.class}\n#{e.}\n\n=== BACKTRACE ===\n" + e.backtrace.join("\n") end |
#perform ⇒ Object
3 4 5 |
# File 'app/models/delayed_mailhopper/send_job.rb', line 3 def perform Email.find(id).send! end |
#success(job) ⇒ Object
7 8 9 |
# File 'app/models/delayed_mailhopper/send_job.rb', line 7 def success(job) Rails::logger.info "[DelayedMailhopper::SendJob] success for email_id #{id}, delayed_job_id #{job.id}" end |