0

私はrabbitmqで動作するようにactionmailerを設定しようとしています.

development.rb:

config.action_mailer.queue = Messaging::AmqpClient.instance

そしてメーラーで:

class OrdersNotifier < ActionMailer::Base
  default from: "me <noreply@e.me.com>"
  def queue
    Messaging::AmqpClient.instance.publish('ddd', 'test_msg')
  end

私が使用しているメールを送信するには:

 OrdersNotifier.new_order_email_to_seller(self).deliver

bu私は得る:

undefined method `queue=' for ActionMailer::Base:Class

メールを配信しようとしたとき。

4

1 に答える 1

1

私は間違っているかもしれませんが、「キュー」は Rails 4 のみの機能であり、今では master ブランチから削除されています。

ここを参照してください:

http://blog.remarkablelabs.com/2012/12/asynchronous-action-mailer-rails-4-countdown-to-2013

The queue feature has been removed from the master branch, which means it will not be making the initial Rails 4.0 release.
于 2013-06-10T16:00:12.100 に答える