Paulo Benatto
06/17/2021, 8:59 AM@task
def create_task_list(ids):
l = []
for i in ids:
l.append(ReferralUID())
return l
@task
def generate_ids():
return ["id1", "id2", "id3"]
with Flow("parallel-execution") as flow:
ids = generate_ids()
list_of_tasks = create_task_list(ids)
request_referral = RequestReferralDetail()
#ย list_of_tasks should be a list, but i'm returning a task. how to inject a list on bind?
request_referral.bind(request_details=list_of_tasks, flow=flow)
flow.visualize()
flow.run(executor=LocalDaskExecutor())
ThanksRob Fowler
06/17/2021, 9:57 AMrequest_referral.map(list_of_items, unampped(static_argument)
Paulo Benatto
06/17/2021, 10:05 AMRob Fowler
06/17/2021, 10:16 AMPaulo Benatto
06/17/2021, 12:44 PMrun
method inside of RequestReferralDetail
class RequestReferralDetail(Task):
def run(self, request_details):
if isinstance(request_details, Task):
request_details.run()
I think I still missing something, probably i will read more doc ๐ Thanks ur help mate