Not receiving mails with Rails actionmailer and delayed job

I am using delayed job with actionmailer. I have more than 5 mailer and 40 mailer actions. All working fine except for one mail action mails are not being send or not being received by user for some user. But when I try with disabling delayed_job, its working perfectly. I checked the logs, one job is created every time and processed without error. I even have configuration to not to remove failed jobs. I don't know if I should post any code here since with delayed job disabled, that mail is working fine so I guess issue is not with mailer action. I can't figure it out that where is the problem.

Edit (log for failing job):

D, [2016-07-07T05:53:00.757530 #31786] DEBUG -- : User Load (0.2ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 69 LIMIT 1 D, [2016-07-07T05:53:00.773829 #31786] DEBUG -- : EquipmentMailer#send_post_expired_email: processed outbound mail in 190.1ms D, [2016-07-07T05:53:00.774358 #31786] DEBUG -- : (0.1ms) BEGIN D, [2016-07-07T05:53:00.775255 #31786] DEBUG -- : SQL (0.3ms) DELETE FROM `delayed_jobs` WHERE `delayed_jobs`.`id` = 255 D, [2016-07-07T05:53:00.776992 #31786] DEBUG -- : (1.6ms) COMMIT I, [2016-07-07T05:53:00.777182 #31786] INFO -- : 2016-07-07T05:53:00-0700: [Worker(delayed_job host:example.com pid:31786)] Job EquipmentMailer.send_post_expired_email (id=255) COMPLETED after 0.1972

I noticed that immediately after processing the outbound mail, it is deleting job but for working jobs it after processing it creates the mail with from, to, render the template and encode the assets.

链接地址: http://www.djcxy.com/p/65788.html

上一篇: 使用java在Android项目中获取计算机的IP地址

下一篇: 不接收Rails actionmailer和延迟作业的邮件