Adding support to replaced_task_nesting in chains allows for overcoming a very specific use case.
Overall, what it does is set all of the tasks of the chain with the correct replaced_task_nesting level, if the canvas is built from a chain that contains a replaced task that is also a chain (in which case the DAG gets broken as two tasks can be each other's parents which this fix allows overcoming).

TODO:
Maybe add some example doc with enhanced explanation although it would require a bit of effort so I'll get to it at a later date.
Added support for replaced_task_nesting in chains. Adding support to replaced_task_nesting in chains allows for overcoming a very specific use case.
Overall, what it does is set all of the tasks of the chain with the correct replaced_task_nesting level, if the canvas is built from a chain that contains a replaced task that is also a chain (in which case the DAG gets broken as two tasks can be each other's parents which this fix allows overcoming).

TODO:
Maybe add some example doc with enhanced explanation although it would require a bit of effort so I'll get to it at a later date.
=================================
 Celery - Distributed Task Queue
=================================

Celery is a simple, flexible, and reliable distributed system to
process vast amounts of messages, while providing operations with
the tools required to maintain such a system.

It's a task queue with focus on real-time processing, while also
supporting task scheduling.

Celery has a large and diverse community of users and contributors,
you should come join us :ref:`on IRC <irc-channel>`
or :ref:`our mailing-list <mailing-list>`.

Celery is Open Source and licensed under the `BSD License`_.

Donations
=========

This project relies on your generous donations.

If you are using Celery to create a commercial product, please consider becoming our `backer`_ or our `sponsor`_ to ensure Celery's future.

.. _`backer`: https://opencollective.com/celery#backer
.. _`sponsor`: https://opencollective.com/celery#sponsor

Getting Started
===============

- If you're new to Celery you can get started by following
  the :ref:`first-steps` tutorial.

- You can also check out the :ref:`FAQ <faq>`.

.. _`BSD License`: http://www.opensource.org/licenses/BSD-3-Clause

Contents
========

.. toctree::
    :maxdepth: 1

    copyright

.. toctree::
    :maxdepth: 2

    getting-started/index
    userguide/index

.. toctree::
    :maxdepth: 1

    django/index
    contributing
    community
    tutorials/index
    faq
    changelog
    whatsnew-5.2
    reference/index
    internals/index
    history/index
    glossary


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

=================================
 Celery - Distributed Task Queue
=================================

Celery is a simple, flexible, and reliable distributed system to
process vast amounts of messages, while providing operations with
the tools required to maintain such a system.

It's a task queue with focus on real-time processing, while also
supporting task scheduling.

Celery has a large and diverse community of users and contributors,
you should come join us :ref:`on IRC <irc-channel>`
or :ref:`our mailing-list <mailing-list>`.

Celery is Open Source and licensed under the `BSD License`_.

Donations
=========

This project relies on your generous donations.

If you are using Celery to create a commercial product, please consider becoming our `backer`_ or our `sponsor`_ to ensure Celery's future.

.. _`backer`: https://opencollective.com/celery#backer
.. _`sponsor`: https://opencollective.com/celery#sponsor

Getting Started
===============

- If you're new to Celery you can get started by following
  the :ref:`first-steps` tutorial.

- You can also check out the :ref:`FAQ <faq>`.

.. _`BSD License`: http://www.opensource.org/licenses/BSD-3-Clause

Contents
========

.. toctree::
    :maxdepth: 1

    copyright

.. toctree::
    :maxdepth: 2

    getting-started/index
    userguide/index

.. toctree::
    :maxdepth: 1

    django/index
    contributing
    community
    tutorials/index
    faq
    changelog
    whatsnew-5.2
    reference/index
    internals/index
    history/index
    glossary


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
