Suppose i have Report-Building-Workflow roughly described as follows
@shared_task
def report_builder(*args, **kwargs)
return chain(
group(gather_data_from_service_a.s()....),
merge_data.s(),
export_to_html.s(),
export_to_pdf.s(),
store_pdf_on_s3.s(),
).apply_async()
Called by task = report_builder.s().apply_async()
How do I keep track of the main task (here: report_builder)? Problem is the main-task succeeds short after its been called (because all it does is returning an AsyncResult).
What i want to achieve is to poll status-information about the main-task, transitioning from PENDING to STARTED to (SUCCESS or FAILURE) and in the end get the s3-location of the last task in the chain as a result of the main task.