Skip to content

task replace chord inside chord not working. #4368

Closed

Description

@zpl

Steps to reproduce

if we trying to replace task in a chord by another chord we have a problem - outer chord body not called

add_to_chord not working too

for example

@app.task(bind=True, ignore_result=True)
def some_task(self, args=None, **kwargs):
    #add_to_chord not working too
    #self.add_to_chord(chord([echo.s(name='t1'), echo_s.s(name='t2'), echo.s(name='t3')], echo.s(name='inner_chord_end')))
    raise self.replace(chord([echo.s(name='t1'), echo.s(name='t2'), echo.s(name='t3')], echo.s(name='inner_chord_end')))

@app.task(bind=True, ignore_result=True)
def echo(self, args=None, **kwargs):
    print(kwargs['name'])
    return kwargs['name']


result = chord([some_task.s(), echo.s(name='task')], echo.s(name='total end')).apply_async()

Expected behavior

   echo.s(name='total end') called

Actual behavior

  echo.s(name='total end') SKIPPED

Activity

  1. added this to the v4.2 milestone on Dec 20, 2017
  2. modified the milestones: v4.2, on Jan 13, 2018
  3. added a commit that references this issue on Jan 14, 2018
    442f42b
  4. modified the milestones: , v4.2 on Jan 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions