Skip to content

Canvas workflow group and chain combin complex chain ,some task not be called #6030

Open

Description

@yuan6785

celery4.4.2 python3.7,broker redis, rabbitmq

code:

@app.task
def hello_world1():
    print('hello1')
    return "bqq1"

@app.stask
def hello_world2():
    print('hello2')
    return "bqq2"

@app.stask
def hello_world3():
    print('hello2')
    return "bqq2"


def dag():
    from celery import chord, group, chain
    a1 = hello_world1.si()
    a2 = hello_world2.si()
    a3 = hello_world3.si()
    # workflow
    ff = group([a1, a2])
    # ff1 = chain(ff, a3, ff, a2, a1)  
    ff1 = chain(ff, a3, ff, a2)
    ff2 = group(ff1, a2, a3)
    # workflow = chain(a1, a2, ff2, a3, a2)
    workflow = chain(a1, a2, ff2, a3)
    workflow()

dag()

some task not call, but the last task is called. look this image, run order is Bottom-up!
index 13 task be called repeatedly(At least twice).

index 11, 12 is not be called. but the last task be called

Activity

  1. auvipy commented on May 15, 2020

    @auvipy
    Member

    did you get any solution in the mean time?

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions