你可以反弹瘦服务器而不是一次性重启它们吗?

时间:2013-06-02 22:33:39

标签: ruby-on-rails thin

这很糟糕:

$ thin restart -p 4000 -s 3 -d;
Stopping server on 0.0.0.0:4000 ... 
Sending QUIT signal to process 13375 ... 
>> Exiting!
Stopping server on 0.0.0.0:4001 ... 
Sending QUIT signal to process 13385 ... 
>> Exiting!
Stopping server on 0.0.0.0:4002 ... 
Sending QUIT signal to process 13397 ... 
>> Exiting!
Starting server on 0.0.0.0:4000 ... 
Starting server on 0.0.0.0:4001 ... 
Starting server on 0.0.0.0:4002 ... 

有没有办法循环每个服务器并一次重启一个?

1 个答案:

答案 0 :(得分:2)

RTM

> thin
Command required
Usage: thin [options] start|stop|restart|config

[...]

Cluster options:
    -s, --servers NUM                Number of servers to start
    -o, --only NUM                   Send command to only one server of the cluster
    -C, --config FILE                Load options from config file
    -O, --onebyone                   Restart the cluster one by one (only works with restart command)