ActionMailer ActiveJobs and register_interceptor/register_observer

35 views
Skip to first unread message

Andrew Kaspick

unread,
Feb 11, 2017, 3:04:54 AM2/11/17
to Ruby on Rails: Talk
Hi,

I'm using delayed job to send emails (via ActionMailer) as a background job, but I also have an interceptor registered via http://api.rubyonrails.org/classes/ActionMailer/Base.html#method-c-register_interceptor and an observer registered via http://api.rubyonrails.org/classes/ActionMailer/Base.html#method-c-register_observer

Neither the interceptor or observer appear to work when the job is run though.  Is there a way to allow interceptors and observers to work in background jobs?

Thanks

Andrew Kaspick

unread,
Feb 11, 2017, 2:55:36 PM2/11/17
to Ruby on Rails: Talk
Turns out I had a bug in my code and the observers and interceptors do in fact work correctly.
Reply all
Reply to author
Forward
0 new messages