2010-02-12 128 views
2

我一直在使用delayed_job而沒有問題一段時間;主要用於排隊ActionMailer調用(Notifier.send_later ...)。最近它發送了來自同一份工作的隨機多個電子郵件。我會排隊一封電子郵件,我會同時收到五次,或一次,或兩次。我已經重新啓動了delayed_job,它似乎有點行爲。任何人都會遇到這個問題Delayed_job多次運行相同的作業?

這是我的日誌;我從來沒見過這些錯誤......

# Logfile created on 2010-02-11 by logger.rb 
*** below you find the most recent exception thrown, this will be likely (but not certainly) the exception that made the application exit abnormally *** 
#<NameError: uninitialized constant Delayed::Worker> 
*** below you find all exception objects found in memory, some of them may have been thrown in your application, others may just be in memory because they are standard exceptions *** 
#<NoMemoryError: failed to allocate memory> 
#<SystemStackError: stack level too deep> 
#<fatal: exception reentered> 
#<LoadError: no such file to load -- tmail> 
#<SystemExit: exit> 
#<NameError: uninitialized constant Delayed::Worker::Merb> 
#<NameError: uninitialized constant Merb> 
#<NameError: uninitialized constant Delayed::Merb> 
#<NameError: uninitialized constant Merb> 
#<NameError: uninitialized constant Delayed::Merb> 
#<NameError: uninitialized constant Delayed::Worker::Merb> 
#<NameError: "Gems::DelayedJob-1.8.4::Lib::Delayed::Worker" is not a valid constant name!> 
#<NameError: uninitialized constant Delayed::Worker> 

回答

2

當您部署應用程序的新版本,請確保殺死所有DJ工人和僅啓動1(或包含很多你想要的 - 從1開始調試這個問題)。

ps -ef | grep delayed_job 
+1

是否有多個DJ工作進程具有相同工人名稱的問題?在什麼情況下,一個以上的員工可以完成同樣的任務? – 2012-01-26 11:12:53

0

我有同樣的問題,當我檢查了我的隊列,我發現我在工作有錯誤和DJ試圖再次運行,這再次工作。

相關問題