我在使用.delay方法使用Redis / Sidekiq发送延迟消息时遇到问题。我目前使用ActionMailer,它就像一个魅力。我可以跑..
Notifier.new_user_welcome_email(name).deliver
零问题。但是一旦我试图跑......
Notifier.delay.new_user_welcome_email(name)
它在我的Sidekiq重试中因错误而窒息..
ArguementError
Wrong number of arguements (3 of 0)
这是在Sidekiq :: Extensions :: DelayedMailer类下。
最大的问题是,这在我的测试服务器上完美运行,但在我的实时服务器上窒息。我已经在实时服务器上重置了Redis和Sidekiq,但它还没有解决它。
非常感谢任何帮助。
修改
这是完整的回溯。
…ctionpack-3.2.17/lib/abstract_controller/view_paths.rb: 45:in `initialize'
…ctionpack-3.2.17/lib/abstract_controller/view_paths.rb: 45:in `new'
…ctionpack-3.2.17/lib/abstract_controller/view_paths.rb: 45:in `lookup_context'
…9.1/gems/actionmailer-3.2.17/lib/action_mailer/base.rb: 457:in `process'
…9.1/gems/actionmailer-3.2.17/lib/action_mailer/base.rb: 453:in `initialize'
…9.1/gems/actionmailer-3.2.17/lib/action_mailer/base.rb: 439:in `new'
…9.1/gems/actionmailer-3.2.17/lib/action_mailer/base.rb: 439:in `method_missing'
…sidekiq-2.12.3/lib/sidekiq/extensions/action_mailer.rb: 17:in `perform'
…uby/1.9.1/gems/sidekiq-2.12.3/lib/sidekiq/processor.rb: 48:in `block (3 levels) in process'
….1/gems/sidekiq-2.12.3/lib/sidekiq/middleware/chain.rb: 109:in `call'
….1/gems/sidekiq-2.12.3/lib/sidekiq/middleware/chain.rb: 109:in `block in invoke'
….1/gems/sidekiq-2.12.3/lib/sidekiq/middleware/chain.rb: 111:in `block in invoke'
…-2.12.3/lib/sidekiq/middleware/server/active_record.rb: 6:in `call'
….1/gems/sidekiq-2.12.3/lib/sidekiq/middleware/chain.rb: 111:in `block in invoke'
…kiq-2.12.3/lib/sidekiq/middleware/server/retry_jobs.rb: 49:in `call'
….1/gems/sidekiq-2.12.3/lib/sidekiq/middleware/chain.rb: 111:in `block in invoke'
…idekiq-2.12.3/lib/sidekiq/middleware/server/logging.rb: 11:in `block in call'
…/ruby/1.9.1/gems/sidekiq-2.12.3/lib/sidekiq/logging.rb: 22:in `with_context'
…idekiq-2.12.3/lib/sidekiq/middleware/server/logging.rb: 7:in `call'
….1/gems/sidekiq-2.12.3/lib/sidekiq/middleware/chain.rb: 111:in `block in invoke'
….1/gems/sidekiq-2.12.3/lib/sidekiq/middleware/chain.rb: 114:in `call'
….1/gems/sidekiq-2.12.3/lib/sidekiq/middleware/chain.rb: 114:in `invoke'
…uby/1.9.1/gems/sidekiq-2.12.3/lib/sidekiq/processor.rb: 47:in `block (2 levels) in process'
…uby/1.9.1/gems/sidekiq-2.12.3/lib/sidekiq/processor.rb: 102:in `stats'
…uby/1.9.1/gems/sidekiq-2.12.3/lib/sidekiq/processor.rb: 46:in `block in process'
…uby/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb: 25:in `call'
…uby/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb: 25:in `public_send'
…uby/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb: 25:in `dispatch'
…uby/1.9.1/gems/celluloid-0.14.1/lib/celluloid/calls.rb: 67:in `dispatch'
…by/1.9.1/gems/celluloid-0.14.1/lib/celluloid/future.rb: 15:in `block in new'
…1/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb: 59:in `call'
…1/gems/celluloid-0.14.1/lib/celluloid/internal_pool.rb: 59:in `block in create'