Using rails 2.3.11 and delayed_job 2.0.4 as a gem I get an error when using handle_asynchronously
:
In my ActionMailer model, I delcared my_method and added ' handle_asynchronously :my_method' right after the declaration :
class MailSender < ActionMailer::Base
def my_method
...
end
handle_asynchronously :my_method
end
When calling MailSender.deliver_my_method
the task is correctly added to the queue. But when trying to process it, it fails with the error message :
undefined method `rappel_email_without_delay' for #<YAML::Object:0x1034b85f8>
Delaying with MailSender.delay.deliver_my_method
is working and the task correctly processed - But i'd rather use handle_asynchronously
un my model to ensure mail are always sent in the background...
You need to restart the worker processes using
rake jobs:work
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With