Closed codesnik closed 10 years ago
@codesnik Definitely. Most people use god or some other process monitor in production. I think a deployment page in the wiki would be a great way to start.
Is it possible to use in capistrano deploy something like that?
task :qu do run "cd #{deploy_to}/current/ && nuhup bundle exec rake qu:work QUEUES=urgent,default &" end
it would work. but it won't restart worker if you changed it, and it would start worker on every deploy. looks like daemon-kit is needed for a robust solution.
Hm, I've tried and it does passing well, without errors, but Qu seems not starting and handling the jobs. It doesn't even create log file, but locally it does everything perfectly. What is the way to restart a worker?
https://github.com/ddollar/foreman#readme maybe this could help.
@Maay, @codesnik: I would recommend managing the process server side. Either using god or foreman+upstart. See the Resque FAQ on restarting workers with capistrano.
running rake task is simple for development, but what if we updated worker code and want to deploy a new one? somthing should find previous worker pid, kill it, run another. looks like some kind of daemonization needed.
I'm sure we'll figure that out, but we won't be the first who did, so can you please add a section to the README?