How can i delete all tasks in a queue, right after a task ended?
I want something like this (Deleting all pending tasks in celery / rabbitmq) but for celery 3.0.
Thanks
EDIT:
From celery documentation: http://docs.celeryproject.org/en/latest/faq.html#how-do-i-purge-all-waiting-tasks
My code looks like:
from celery import current_app as celery
@task
def task_a():
celery.control.purge()
I was expecting that, if i issued 5 tasks, only the first would run. Somehow, i'ts not doind that.
Thanks