我想要bluepill來監視我的resque工人。Resque命令從終端工作,但不通過藍圖
如果我以root用戶的身份從我的rails root運行此命令,它會啓動resque worker ok。
cd /var/www/domain.com/current; RAILS_ENV=production QUEUE=* bundle exec rake resque:work
但是當我嘗試運行它使用bluepill它只是不斷嘗試啓動它,並沒有給我一個錯誤。
這是我的bluepill日誌顯示它嘗試....!
W, [2011-07-12T22:58:21.640467 #19267] WARN -- : [domain.com:resque] Executing start command: cd /var/www/domain.com/current; RAILS_ENV=production QUEUE=* bundle exec rake resque:work
I, [2011-07-12T22:58:21.754392 #19267] INFO -- : [domain.com:resque] Going from down => starting
I, [2011-07-12T22:59:21.334300 #19267] INFO -- : [domain.com:resque] Going from starting => down
W, [2011-07-12T22:59:22.339873 #19267] WARN -- : [domain.com:resque] Executing start command: cd /var/www/domain.com/current; RAILS_ENV=production QUEUE=* bundle exec rake resque:work
I, [2011-07-12T22:59:22.479740 #19267] INFO -- : [domain.com:resque] Going from down => starting
它一直這樣做一遍又一遍。
這裏是我的.pill文件過程
app.process("resque") do |process|
process.start_command = "cd #{RAILS_ROOT}; RAILS_ENV=#{RAILS_ENV} QUEUE=* bundle exec rake resque:work"
process.daemonize = true
process.start_grace_time = 10.seconds
process.stop_grace_time = 10.seconds
process.restart_grace_time = 10.seconds
end
我試圖延長啓動延期時間如果沒有在規定的時間加載但不能發揮作用。
請任何人都可以幫忙嗎?
在此先感謝 裏克
你應該真正考慮使用resque-pool,它大大簡化了事情,並且讓你更好地控制你的隊列,如果你有很多人處理不同的任務。 – d11wtq