celery-progress icon indicating copy to clipboard operation
celery-progress copied to clipboard

This could benefit from documantation for how to use it with chord or group based workflows.

Open mscout1 opened this issue 2 years ago • 3 comments

I like this very much but my current use case involves a complex set of chains and chords. I want to monitor the progress of the workflow as a whole, not just one task of it.

For example:

@shared_task(bind=True)
def do_one_step(self, item):
    #do item
    #Progress + 1
    return item

@shared_task(bind=True)
def finalize(self, items)
    #do item
    #Progress finish
    return item
    
def start_it(items)
    # Progress Init with len(items) total size
    work = chord(group([do_one_step.si(item) for all in items]), finalize.s())
    work.apply_async()

I want to track the progress of the entire work graph. Is there a good way to do that with this library?

mscout1 avatar Mar 14 '22 17:03 mscout1

I haven't run into this need and off the top of my head I'm not sure if there is any way to do what you want, given the ProgressRecorder is pretty coupled with the task instance.

Interested to hear if anyone else has any better suggestions though!

czue avatar Mar 15 '22 14:03 czue

Thanks for getting back to me. I'm probably going to go with rolling my own in that case.

mscout1 avatar Mar 15 '22 15:03 mscout1

@mscout1 Hi! I also have a need for something like this. Do you mind sharing the approach you plan on using? Thank you!

akornor avatar Mar 27 '22 13:03 akornor