Last active
July 12, 2016 08:43
-
-
Save ajoyoommen/8c3547e8f52c424f17e4b10407528f4b to your computer and use it in GitHub Desktop.
Simple Celery script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -n "$1" ]; then | |
if [ $1 == "kill" ]; then | |
kill -9 `ps aux |grep projectname |grep celery |awk '{ print $2 }'` | |
elif [ $1 == "list" ]; then | |
ps aux |grep projectname |grep celery | |
elif [ $1 == "start" ]; then | |
cd projectname/ | |
source venv/bin/activate | |
source env.sh | |
celery -A projectname worker -l info | |
fi | |
else | |
echo "usage:kill|list|start" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment