New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug relating to kombu 4.6.0 with determining active tasks #1051
Comments
So celery is facing bug with this right? could you try celery master with kombu 4.6? and inpossible try to track the root of regression? |
@auvipy I'm pretty sure I've got celery master and kombu 4.6.0 installed, and I can recreate this in my application to. I haven't tried to distill it to a small reproducible example, but I can reproduce it all the same |
I have it recreated in isolation. Sample script:
Environment setup:
Running the worker:
Me trying to inspect unsuccessfully, then successfully running a task:
|
(This is just a +1!) We have seen this in our product, too; pretty much the same as above, with |
This is probably resolved on the master branch, the thing that caused #1052 was reverted. |
removing this pin, since the issue is now resolved. kombu<4.6.0 # Bug with inspecting active tasks: celery/kombu#1051
The code below works in Kombu 4.5.0 but not 4.6.0. The problem is with Celery's inspect object. active_tasks = i.active() <-- This always seems to be returning 'None' with 4.6.0
In the past, we would receive a list of the active tasks.
FWIW we are seeing this issue on Python 3.7 with a service called Lemur (You can see the dependencies in the requirements files here: https://github.com/Netflix/lemur)
In 4.5.0, i.active() returns a dict with celery worker hosts as the keys, and a list of their tasks as values.
<class 'dict'>: {'celery@worker-host': [{'id': '1e8743d6-8375-453a-83e2-9cc4af1415ae', 'name': 'lemur.common.celery.fetch_all_pending_acme_certs', 'args': '()', 'kwargs': '{}', 'type': 'lemur.common.celery.fetch_all_pending_acme_certs', 'hostname': 'celery@worker-host, 'time_start': 1559248134.1262424, 'acknowledged': True, 'delivery_info': {'exchange': '', 'routing_key': 'celery', 'priority': 0, 'redelivered': None}, 'worker_pid': 87281}, {'id': '52149d6e-6a81-4368-8ddb-dcad01585fd3', 'name': 'lemur.common.celery.fetch_acme_cert', 'args': '(669,)', 'kwargs': '{}', 'type': 'lemur.common.celery.fetch_acme_cert', 'hostname': 'celery@worker-host', 'time_start': 1559248137.8084652, 'acknowledged': True, 'delivery_info': {'exchange': '', 'routing_key': 'celery', 'priority': 0, 'redelivered': None}, 'worker_pid': 87284}]}
The text was updated successfully, but these errors were encountered: