Commit a4b5329a06728536338516aa5fbefc8039ebb3eb
1 parent
7e277a5d
Exists in
staging
and in
4 other branches
expose unicorn restart time
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
script/production
... | ... | @@ -2,6 +2,8 @@ |
2 | 2 | |
3 | 3 | set -e |
4 | 4 | |
5 | +TIMEOUT=60 | |
6 | + | |
5 | 7 | if [ -e /etc/default/noosfero ]; then |
6 | 8 | . /etc/default/noosfero |
7 | 9 | fi |
... | ... | @@ -40,8 +42,10 @@ app_server_stop() { |
40 | 42 | app_server_restart() { |
41 | 43 | # see unicorn_rails(1) and "Signal handling" in unicorn documentation |
42 | 44 | kill -s USR2 $(cat tmp/pids/unicorn.pid) |
43 | - while [ ! -f tmp/pids/unicorn.pid.oldbin ] | |
45 | + count=0 | |
46 | + while [ ! -f tmp/pids/unicorn.pid.oldbin || $count > $TIMEOUT ] | |
44 | 47 | do |
48 | + echo "Waitting for $count" | |
45 | 49 | sleep 1 |
46 | 50 | done |
47 | 51 | kill -s QUIT $(cat tmp/pids/unicorn.pid.oldbin) | ... | ... |