没有任何信号,例如 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)