【问题标题】:Restart Resque-Pool重启 Resque-Pool
【发布时间】:2013-07-15 02:24:17
【问题描述】:

没有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)

【问题讨论】:

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


    【解决方案1】:

    我认为由于 QUIT 可以优雅地关闭工作人员和池管理器,因此您需要等待。如果您想立即杀死,请发送 TERM。

    【讨论】:

    • 谢谢托尼。我不再使用resque所以无法验证。如果其他人验证它会接受它。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-12
    • 1970-01-01
    • 1970-01-01
    • 2015-11-08
    • 1970-01-01
    相关资源
    最近更新 更多