使用Sidekiq 的延迟扩展时,我的bundle exec sidekiq
shell 中出现此错误:
2013-03-06T04:13:57Z 52099 TID-ouqzj4xl8 WARN: undefined method `send_message' for #<Class:0x007f8a783d72f0>
在我的控制器中:
MyClass.delay_until(10.seconds.from_now, :retry => true).send_message(deliver_sms, phone)
在我的模型中:
require 'sidekiq'
class MyClass < ActiveRecord::Base
include Sidekiq::Extensions
def self.send_message(deliver_sms, phone)
message_id = deliver_sms.deliver(phone, 'This is a test message')
end
end
任何帮助,将不胜感激