From a8368318fe5b2b164930794c154d8d912d1fd1df Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 4 Oct 2018 16:26:07 +0800 Subject: [PATCH] Revert "Avoid hardcoded value in `unicorn_launcher`." This seems to be causing problem with the unicorn master pid tracking so revert for now. This reverts commit 09d0216e842bd5ea131fb1c68582a176ffb7d345. --- config/unicorn_launcher | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/config/unicorn_launcher b/config/unicorn_launcher index 17f492462d7..b2eb9b8ac8e 100755 --- a/config/unicorn_launcher +++ b/config/unicorn_launcher @@ -15,14 +15,9 @@ function on_reload() { echo "Reloading unicorn" kill -s USR2 $UNICORN_PID - - while [ -z "$NEW_UNICORN_PID" ]; do - echo "waiting for new unicorn master pid" - NEW_UNICORN_PID=`ps -f --ppid $UNICORN_PID | grep 'unicorn master' | grep -v worker | awk '{ print $2 }'` - sleep 1 - done - + sleep 10 curl $LOCAL_WEB &> /dev/null + NEW_UNICORN_PID=`ps -f --ppid $UNICORN_PID | grep unicorn | grep -v worker | awk '{ print $2 }'` kill -s QUIT $UNICORN_PID echo "Old pid is: $UNICORN_PID New pid is: $NEW_UNICORN_PID" UNICORN_PID=$NEW_UNICORN_PID