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
{{ message }}
Repository navigation
Termination tasks with eventlet/gevent worker pool. #4019
I believe the issue am facing while terminating the task has to do with this feature request
Am using the celery [ v4.1.0 ] with Flask as : celery -A run.celery worker -P eventlet -c 50 --loglevel=info
[2018-05-11 17:16:28,137: ERROR/MainProcess] pidbox command error: NotImplementedError("<class 'celery.concurrency.eventlet.TaskPool'> does not implement kill_job",)
Traceback (most recent call last):
File "/home/sreenadh/Projects/test_project/.tp/lib/python3.5/site-packages/kombu/pidbox.py", line 101, in dispatch
reply = handle(method, arguments)
File "/home/sreenadh/Projects/test_project/.tp/lib/python3.5/site-packages/kombu/pidbox.py", line 122, in handle_cast
return self.handle(method, arguments)
File "/home/sreenadh/Projects/test_project/.tp/lib/python3.5/site-packages/kombu/pidbox.py", line 116, in handle
return self.handlers[method](self.state, **arguments)
File "/home/sreenadh/Projects/test_project/.tp/lib/python3.5/site-packages/celery/worker/control.py", line 164, in revoke
request.terminate(state.consumer.pool, signal=signum)
File "/home/sreenadh/Projects/test_project/.tp/lib/python3.5/site-packages/celery/worker/request.py", line 248, in terminate
pool.terminate_job(self.worker_pid, signal)
File "/home/sreenadh/Projects/test_project/.tp/lib/python3.5/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
I believe the killing would be possible using Eventlet API corresponding to the greenthread.kill() ?
Activity
auvipy commentedon Jan 11, 2018
have you any suggested workarounds?
jengelman commentedon Mar 14, 2018
+1
sreecodeslayer commentedon May 11, 2018
I believe the issue am facing while terminating the task has to do with this feature request
Am using the celery [
v4.1.0] with Flask as :celery -A run.celery worker -P eventlet -c 50 --loglevel=infoI believe the killing would be possible using
Eventlet APIcorresponding to thegreenthread.kill()?MrJeric0 commentedon Jun 21, 2018
+1
seiyata commentedon Nov 28, 2018
+1
basitiyidir commentedon Dec 20, 2018
+1
antoarva commentedon Jan 10, 2019
+1
RogerLiNing commentedon Feb 19, 2019
+1
tobiaskohler commentedon Jun 27, 2019
+1
MarcDelahousse commentedon Jul 2, 2019
+1
ioliveros commentedon Jul 15, 2019
+1
21 remaining items
Kanishk-Kumar commentedon Oct 20, 2023
+1
mht2953658596 commentedon Aug 18, 2024
+1
mht2953658596 commentedon Aug 18, 2024
+1
bengabp commentedon Sep 19, 2024
Not fixed yet ??
Nusnus commentedon Sep 19, 2024
@bengabp
#9083
bengabp commentedon Sep 19, 2024
Yeah I still got the error raised even after using terminate=True
Nusnus commentedon Sep 19, 2024
@ldsink Can you give it a look please 🙏
Nusnus commentedon Sep 19, 2024
@bengabp
Can you please share more info?
Are you doing anything differently than what the PR fixes?
bengabp commentedon Sep 19, 2024
No. Just a generic task I have which is running on gevent pool and worker raises not implemented exception when I revoke the task
Nusnus commentedon Sep 19, 2024
Are you using the latest pre-release of Celery?
Just confirming
bengabp commentedon Sep 19, 2024
@Nusnus

Nusnus commentedon Sep 19, 2024
@bengabp
This fix was released in 5.5.0b2:
https://github.com/celery/celery/blob/main/Changelog.rst#L193
You will need to upgrade to the latest pre-release or wait for the final release to have the fix from the PR.
bengabp commentedon Sep 19, 2024
Okay