0👍
I couldn’t simulate your problem but can suggest two important points:
-
Celery documentation says you should start celery with -A flag first.
celery -A proj worker -l INFO
-
In the documentation, every
revoke()
method called fromapp.control
, not fromcelery
library itself. So you should change this line:
celery.control.revoke(self.task_id, terminate=True, signal='SIGKILL')
to this line:
from proj.celery import app
app.control.revoke(self.task_id, terminate=True, signal='SIGKILL')
I hope this will solve your problem.
Source:stackexchange.com