Revoke celery task

489 views
Skip to first unread message

Mauro Sánchez

unread,
Apr 12, 2017, 4:09:08 AM4/12/17
to Django users
Hello, I am trying to revoke a Pending task in celery without success.
I have tried all this ways:
app.control.revoke(task_id)
revoke(campaign.state_task)
async_result.revoke()
AsyncResult(task_id).revoke()

None of them work. I am using:
celery==3.1.23
django-celery==3.1.17
Django==1.9.13
tenant-schemas-celery==0.1.5

Any idea why this is happening. I can't see any errors when I run those commands.
Thanks for the help.
Cheers

Mauro Sánchez

unread,
Apr 12, 2017, 7:11:59 PM4/12/17
to Django users
Hello, I've found out my problem. It is that I am using Heroku, so when the worker is restarted, the revoked tasks list is lost.
How can I persist this list in Heroku? Since I cannot write a file in the filesystem.
Thanks a lot.
Reply all
Reply to author
Forward
0 new messages