https://prefect.io logo
Title
a

Andy Yeung

01/06/2023, 10:06 AM
Hi, wanna ask what is the best way to call the subflow. right now I am using something like below:
parallel_subflows = [
    subflow1(ref_id),
    subflow2(ref_id)
]
await asyncio.gather(*parallel_subflows)

but I can't control the random generated flow run name in this way. How can I configure the flow run parameter of the subflow?
m

Mason Menges

01/06/2023, 6:48 PM
I think you should be able to use the with_options method for a flow to do this https://docs.prefect.io/api-ref/prefect/flows/?h=with_options#prefect.flows.Flow.with_options
a

Andy Yeung

01/08/2023, 6:13 AM
Great, looks good now. thanks