Skip to content

Instantly share code, notes, and snippets.

@ajoyoommen
Last active July 12, 2016 08:43
Show Gist options
  • Save ajoyoommen/8c3547e8f52c424f17e4b10407528f4b to your computer and use it in GitHub Desktop.
Save ajoyoommen/8c3547e8f52c424f17e4b10407528f4b to your computer and use it in GitHub Desktop.
Simple Celery script
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