I have a long running celery task. I want to terminate/stop/revoke that task if user hits /cancel route. I used multiple ways of doing this, but none of them worked. I am using RabbitMQ as a message broker.
I have defined a view called "cancel_task" which receives "task_id" from the request parameters.
But, my task is not aborted despite it getting request properly.
Can somebody tell me how to terminate/cancel/stop this task?
Even after cancelling task, this task does not stop executing.
I referred to this document - Abort celery task example
Output -




