【发布时间】:2011-05-23 20:45:45
【问题描述】:
我正在努力学习如何在我的 rails 3 + heroku 应用程序上使用 delay_job。
我目前有以下电子邮件请求(不是延迟工作),但它有效!
UserMailer.conversation_notification(record.commentable, participant, record, @comments).deliver
我将其更新为开始使用delayed_job:
Delayed::Job.enqueue UserMailer.conversation_notification(record.commentable, participant, record, @comments).deliver
但是那个错误是:“ArgumentError (Cannot enqueue items which does not respond to perform):”
我也试过了:
UserMailer.delay.conversation_notification(record.commentable, participant, record, @comments)
但是那个错误是:
NoMethodError (undefined method `delay' for UserMailer:Class):
那里有任何延迟工作大师吗?谢谢
【问题讨论】:
-
未来的谷歌人首先尝试重启你的服务器
标签: ruby-on-rails ruby-on-rails-3 delayed-job