延迟工作轨道

时间:2013-06-29 07:22:25

标签: ruby-on-rails-3 ruby-on-rails-3.2 delayed-job

我正在使用延迟作业发送电子邮件,因为我正在使用此方法          UserMailer.delay.send_mail_to_user。

     But I am getting the following error :
     stack level too deep . 

     When i did full trace i found following issue :
     actionpack (3.2.8) lib/action_dispatch/middleware/reloader.rb:70 

     Hence i am not able to send email through background.please help

谢谢

控制器代码:

           UserMailer.delay.send_mail_to_user
           redirect_to :back

邮件代码:

          class UserMailer < ActionMailer::Base
            def send_mail_to_user
              mail(:from =>CONFIG['smtp_settings']['username'],
              :to => 'sanjay.salunkhe@raweng.com',
              :subject => 'test' )
             end
           end

我也将以下单行作为回溯

     actionpack (3.2.8) lib/action_dispatch/middleware/reloader.rb:70

0 个答案:

没有答案