简体   繁体   English

Delayed_job无法正常工作

[英]Delayed_job is not working correctly

I implemented the delayed job & it is processing fine but it is generating the mails in development.log not in production.log. 我实施了延迟的工作,并且处理得很好,但是它在development.log中而不是production.log中生成邮件。

Also no mail is actually sent, it's just generating in development log. 实际也没有发送邮件,它只是在开发日志中生成。 After processing I have no job in delayed job table also. 处理后,我在延迟的工作表中也没有工作。

I also used RAILS_ENV=production rake jobs:work but still the mail is in development log and is not actually sent; 我还使用了RAILS_ENV=production rake jobs:work但是邮件仍在开发日志中,实际上并未发送; I am using mail server on Ubuntu to send mails. 我在Ubuntu上使用邮件服务器发送邮件。

I have noticed that rake jobs:work by default uses the development log don't know is it same for the production server too? 我注意到rake jobs:work默认情况下使用开发日志来rake jobs:work ,不知道生产服务器也一样吗?

If somebody know the problem then please answer ASAP because my application has been stuck due to this on the production server and lots of mails are just going in development log and not actually going to the end user. 如果有人知道问题所在,那么请尽快回答,因为我的应用程序因此而被卡在生产服务器上,并且很多邮件都只是在开发日志中,而不是最终用户。

This may be obvious, but in your config/production.rb, have you set 这可能很明显,但是在config / production.rb中,您是否设置了

    config.action_mailer.delivery_method = :smtp

It's possible you set the delivery method in config/development.rb, but forgot to do the same in the production environment. 您可能在config / development.rb中设置了交付方式,但是却忘记了在生产环境中这样做。 Please let me know so I can help further! 请让我知道,以便我进一步提供帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM