Skip to content

Instantly share code, notes, and snippets.

@imtapps
Created November 2, 2012 14:58
Show Gist options
  • Save imtapps/4001847 to your computer and use it in GitHub Desktop.
Save imtapps/4001847 to your computer and use it in GitHub Desktop.
Celery & Rabbitmq Commands
Run celery_status.sh in a shell, this will display (real time) the current running celery processes.
Try to kill celery using the "rake celery:kill" task and watch to see if they go away, if they do not, you may have to resort to using "kill -9" on specific pids.
Use the "rake rabbitmq:qs" to see how many requests are in each queue in rabbitmq. If there are 60+ in the error queue run the "clear_rabbitmq_queue.py" file to clear them out.
while [ 1 ]; do
clear
ps aux | grep celery | grep -v grep
sleep 3
done
from amqplib import client_0_8 as amqp
conn = amqp.Connection(host="localhost:5672")
conn = conn.channel()
conn.queue_purge("error")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment