Commit 7e277a5dbc553c45dfeda022b57d0e7c01945c28
1 parent
b36028dc
Exists in
staging
and in
4 other branches
sleep until existe unicorn.pid.oldbin file
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
script/production
| @@ -40,7 +40,10 @@ app_server_stop() { | @@ -40,7 +40,10 @@ app_server_stop() { | ||
| 40 | app_server_restart() { | 40 | app_server_restart() { |
| 41 | # see unicorn_rails(1) and "Signal handling" in unicorn documentation | 41 | # see unicorn_rails(1) and "Signal handling" in unicorn documentation |
| 42 | kill -s USR2 $(cat tmp/pids/unicorn.pid) | 42 | kill -s USR2 $(cat tmp/pids/unicorn.pid) |
| 43 | - sleep 5 | 43 | + while [ ! -f tmp/pids/unicorn.pid.oldbin ] |
| 44 | + do | ||
| 45 | + sleep 1 | ||
| 46 | + done | ||
| 44 | kill -s QUIT $(cat tmp/pids/unicorn.pid.oldbin) | 47 | kill -s QUIT $(cat tmp/pids/unicorn.pid.oldbin) |
| 45 | } | 48 | } |
| 46 | 49 |