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
The Task and TaskExtended models for the database backend do not include children. This means that when using any database backend, AsyncResult.children is always empty, even if a task does have children.
Hey @aaronst 👋,
Thank you for opening an issue. We will get back to you as soon as we can.
Also, check out our Open Collective and consider backing us - every little helps!
We also offer priority support for our sponsors.
If you require immediate assistance please consider sponsoring us.
The Task and TaskExtended models currently do not store children, which causes AsyncResult.children to always return an empty list when using SQLAlchemy database backends.
To avoid breaking existing databases without migrations:
Add a serialized children column (sa.LargeBinary) to TaskExtended (or Task with safe inspection).
In _update_result and _get_task_meta_for, use Celery's configured serializer to serialize/deserialize child task metadata, gracefully falling back to None/empty list if the column or data is absent.
Add test cases in t/unit/backends/test_database.py with canvas workflows (chains/groups) verifying AsyncResult.children.
Could you please assign this to me? I will prepare the implementation and tests.
@VimalN2005 there is no need for assignment, please proceed with the PR and ping me there. thanks for your interest to fix this old problem. and I also saw your stamping related PR. thanks for that as well
Activity
open-collective-bot commentedon Jun 22, 2023
Hey @aaronst 👋,
Thank you for opening an issue. We will get back to you as soon as we can.
Also, check out our Open Collective and consider backing us - every little helps!
We also offer priority support for our sponsors.
If you require immediate assistance please consider sponsoring us.
auvipy commentedon Jun 23, 2023
I can't recall any reason behind it for not supporting it in database back end. would you mind doing some experiment to add that?
aaronst commentedon Jun 23, 2023
It looks like
sqlalchemy.types.ARRAYis only supported with PostgreSQL, so it would have to bePickleTypeto be fully compatible.aaronst commentedon Jun 23, 2023
@auvipy any extra help here would be much appreciated. Happy to keep working the PR, but want to make sure I'm on the right track.
auvipy commentedon Jun 24, 2023
OK sure
VimalN2005 commentedon Sep 12, 2026
Hi @auvipy
Could you please assign this issue to me? I would like to implement task children storage for the database result backend.
Context & Plan:
TaskandTaskExtendedmodels currently do not storechildren, which causesAsyncResult.childrento always return an empty list when using SQLAlchemy database backends.childrencolumn (sa.LargeBinary) toTaskExtended(orTaskwith safe inspection)._update_resultand_get_task_meta_for, use Celery's configured serializer to serialize/deserialize child task metadata, gracefully falling back toNone/empty list if the column or data is absent.t/unit/backends/test_database.pywith canvas workflows (chains/groups) verifyingAsyncResult.children.Could you please assign this to me? I will prepare the implementation and tests.
auvipy commentedon Sep 12, 2026
@VimalN2005 there is no need for assignment, please proceed with the PR and ping me there. thanks for your interest to fix this old problem. and I also saw your stamping related PR. thanks for that as well
test(backends.database): add edge case coverage for children storage …
fix(backends.database): improve backward compatibility and logging fo…
fix(backends.database): store task children with database backend (#8336
fix(backends.database): store task children with database backend (ce…