重启Resque-Pool

时间:2013-07-16 18:37:50

标签: ruby-on-rails resque init.d

the signals无,例如HUP,导致resque-pool重新读取环境。那么我怎样才能重新启动脚本?

在init.d中,我尝试了“kill -QUIT”,然后再次启动它:

echo "kill -QUIT $pid" | sudo -u deploy -i bash
echo 'cd /home/deploy ; bundle exec resque-pool --daemon --environment staging' | sudo -u deploy -i bash

...但我收到了一个错误:

/home/deploy/vendor/bundle/ruby/1.9.1/gems/resque-pool-0.3.0/lib/resque/pool/cli.rb:62:in `manage_pidfile': Pidfile already exists at tmp/pids/resque-pool.pid and process is still running. (RuntimeError)

1 个答案:

答案 0 :(得分:1)

我认为由于QUIT优雅地关闭了工作人员和游泳池经理,您需要等待。如果你想立即杀人,请发送TERM。