How am I supposed to retrieve a task's name when I've got its AsyncResult
object and consequently its id
?
For example if I launch two of my tasks in a chain:
>>> task_chain = (task_A.s() | task_B.s())
>>> async_result = task_chain.apply_async()
I can retrieve the id
of task_B and consequently task_A using the internal _parents()
method like this:
>>> async_result.id
>>> 2ed28e84-0673-4491-a56f-c5ab8dfb5725
>>> async_result._parents()[0].id
>>> e793f4dc-5110-4f57-8f98-8caa48c40528
However when I attempt to retrieve the task_name I get nothing back:
>>> async_result.task_name
>>> async_result._parents()[0].task_name
Why is this happening? Could this possibly be a bug?
I have noticed that by submitting a single task, the task_name
attribute of AsyncResult
works perfectly fine and returns the proper task name.
Is there any other way to retrieve a task's name from the AsyncResult object?
Thank you all in advance.
P.S. I have already found a similar question here but no one seems to propose a pratical and working solution.
UPDATE
Apparently it seems that I've a hit a wall with this one. There is an open ticket on github about the exact same issue with the difference that it concerns groups instead of chains.