I'm aware of Celery's command-line options:
celery -A my_app purge -Q queue_name
But I am looking for a way to purge queue_name from my Python app with Celery, something along the lines of:
def start_chunk(num_of_objs):
# clear current queue before starting here
RELEVANT CODE HERE TO PURGE queue_name
for num in num_of_objcts:
some_task.apply_async(kwargs={'num': num}, queue="queue_name")
Note, I'm aware of this:
from proj.celery import app
app.control.purge()
But as I understand this purges all queues.