4👍
Here is an example on how to read the queue length in rabbitMQ for a given queue:
def get_rabbitmq_queue_length(q):
from pyrabbit.api import Client
from pyrabbit.http import HTTPError
count = 0
try:
cl = Client('localhost:15672', 'guest', 'guest')
if cl.is_alive():
count = cl.get_queue_depth('/', q)
except HTTPError as e:
print "Exception: Could not establish to rabbitmq http api: " + str(e) + " Check for port, proxy, username/pass configuration errors"
raise
return count
3👍
PyRabbit is probably what you are looking for, it is a Python interface to the RabbitMQ management interface API. It will allow you to query for queues and their current message counts.
1👍
You can inspect the workers in celery by using inspect
module. Here is the guide.
Also for RabbitMQ
there are some command line command.
- Assigning blocktrans output to variable
- Django Test Client and Subdomains
- How to track the progress of individual tasks inside a group which forms the header to a chord in celery?
- Django: Forbidden (CSRF cookie not set.)
Source:stackexchange.com