Commit 831474c3 by Ned Batchelder

Merge pull request #2437 from edx/ned/fix-conditional-in-migrate

Killing celery processes shouldn't depend on being interactive
parents 918b3f15 630a57d4
......@@ -91,22 +91,24 @@ EOM
if [ "$input" != "yes" -a "$input" != "y" ]; then
echo "Quitting"
exit 1
else
echo "Killing all celery worker processes."
sudo ${OPENEDX_ROOT}/bin/supervisorctl stop edxapp_worker:* &
sleep 3
# Supervisor restarts the process a couple of times so we have to kill it multiple times.
sudo pgrep -lf celery | grep worker | awk '{ print $1}' | sudo xargs -I {} kill -9 {}
sleep 3
sudo pgrep -lf celery | grep worker | awk '{ print $1}' | sudo xargs -I {} kill -9 {}
sleep 3
sudo pgrep -lf celery | grep worker | awk '{ print $1}' | sudo xargs -I {} kill -9 {}
sleep 3
sudo pgrep -lf celery | grep worker | awk '{ print $1}' | sudo xargs -I {} kill -9 {}
sudo -u forum git -C ${OPENEDX_ROOT}/app/forum/.rbenv reset --hard
fi
fi
if [[ $TARGET == *cypress* ]] ; then
echo "Killing all celery worker processes."
sudo ${OPENEDX_ROOT}/bin/supervisorctl stop edxapp_worker:* &
sleep 3
# Supervisor restarts the process a couple of times so we have to kill it multiple times.
sudo pgrep -lf celery | grep worker | awk '{ print $1}' | sudo xargs -I {} kill -9 {}
sleep 3
sudo pgrep -lf celery | grep worker | awk '{ print $1}' | sudo xargs -I {} kill -9 {}
sleep 3
sudo pgrep -lf celery | grep worker | awk '{ print $1}' | sudo xargs -I {} kill -9 {}
sleep 3
sudo pgrep -lf celery | grep worker | awk '{ print $1}' | sudo xargs -I {} kill -9 {}
sudo -u forum git -C ${OPENEDX_ROOT}/app/forum/.rbenv reset --hard
fi
if [ -f /edx/app/edx_ansible/server-vars.yml ]; then
SERVER_VARS="--extra-vars=\"@${OPENEDX_ROOT}/app/edx_ansible/server-vars.yml\""
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment