I use GOD to watch the process => rake resque:scheduler
Before run 'rake resque:scheduler ' I have to run rake resque_schedule:setup
But the following settings are not working.
I use the ps aux to list the process but the scheduler is not working as I expect.
It should generate tasks periodically.
If I type the 2 commands in shell, it works.
I have no ideas
God.watch do |w|
system("rake resque_schedule:setup ") # run the rake to load environment
w.name = 'resque-scheduler'
w.interval = 5.seconds
w.dir = File.expand_path(File.join(File.dirname(__FILE__),'..'))
# w.start = "rake resque_schedule:setup ; rake resque:scheduler "
w.start = "rake resque:scheduler "
w.start_grace = 10.seconds
w.log = File.expand_path(File.join(File.dirname(__FILE__), '.','log','resque-scheduler.log'))
w.keepalive(:memory_max => 150.megabytes,
:cpu_max => 50.percent)
end