You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2018-12-02 23:53:58,955: INFO/MainProcess] Received task: tasks.add[bb1fe102-c1f9-4361-9370-1129900c0d52]
[2018-12-02 23:54:02,479: INFO/MainProcess] Terminating bb1fe102-c1f9-4361-9370-1129900c0d52 (Signals.SIGTERM)
[2018-12-02 23:54:02,490: ERROR/MainProcess] pidbox command error: NotImplementedError("<class 'celery.concurrency.eventlet.TaskPool'> does not implement kill_job",)
Traceback (most recent call last):
File "d:\envs\aidcs\lib\site-packages\kombu\pidbox.py", line 101, in dispatch
reply = handle(method, arguments)
File "d:\envs\aidcs\lib\site-packages\kombu\pidbox.py", line 122, in handle_cast
return self.handle(method, arguments)
File "d:\envs\aidcs\lib\site-packages\kombu\pidbox.py", line 116, in handle
return self.handlers[method](self.state, **arguments)
File "d:\envs\aidcs\lib\site-packages\celery\worker\control.py", line 163, in revoke
request.terminate(state.consumer.pool, signal=signum)
File "d:\envs\aidcs\lib\site-packages\celery\worker\request.py", line 249, in terminate
pool.terminate_job(self.worker_pid, signal)
File "d:\envs\aidcs\lib\site-packages\celery\concurrency\base.py", line 115, in terminate_job
'{0} does not implement kill_job'.format(type(self)))
NotImplementedError: <class 'celery.concurrency.eventlet.TaskPool'> does not implement kill_job
[2018-12-02 23:55:38,956: INFO/MainProcess] Task tasks.add[bb1fe102-c1f9-4361-9370-1129900c0d52] succeeded in 100.0s: 8
this is my main code:
from celery.app.control import Control
from tasks import add, app
The trackback is showing that the taskpool component you used in celery is implement based on eventlet which has not implemented terminate_job function yet. But the default setting is prefork taskpool which and is the only one who has implemented that function.
And if you want to look at the state of the task only by task_id, you can use :
status = AsyncResult( id).status.The query is blocking which sent a request to your backend line database to get the status.
Reacted by Asif Saif Uddin {"Auvi":"অভি"} and gaoyongxian
Activity
dejlek commentedon Dec 3, 2018
Even though I use different concurrency (prefork, using Redis as broker), I've seen the same problem - sometimes worker can't kill some tasks...
26huitailang commentedon Dec 5, 2018
I used the
signal='SIGKILL'param and gotTask handler raised error: Terminated(9,).Does that mean the task termination succeed?
celery log:
alwaysused commentedon Jan 8, 2019
The trackback is showing that the taskpool component you used in celery is implement based on eventlet which has not implemented terminate_job function yet. But the default setting is prefork taskpool which and is the only one who has implemented that function.
alwaysused commentedon Jan 9, 2019
And if you want to look at the state of the task only by task_id, you can use :
status = AsyncResult( id).status.The query is blocking which sent a request to your backend line database to get the status.