Kiran
03/11/2025, 7:16 AM@flow(log_prints=True)
async def primedependency_triggering_flow():
with open("calc_file.txt", "r") as file:
expressions = [line.strip() for line in file.readlines()]
flow_tasks = []
for num in expressions:
flow_tasks.append(run_deployment(
name="prime-master-flow/calculation-flow-deployment", # Deployment Name
parameters={"number": num},
))
await asyncio.gather(*flow_tasks)
print("All flows triggered successfully!")
UI :Nate
03/11/2025, 2:16 PMKiran
03/12/2025, 6:49 AM@flow(log_prints=True)
async def primedependency_triggering_flow():
with open("calc_file.txt", "r") as file:
expressions = [line.strip() for line in file.readlines()]
for num in expressions:
print(f"triggering flow run {num} successfully")
await run_deployment(
name="prime-master-flow/calculation-flow-deployment", # Deployment Name
parameters={"number": num},
as_subflow=False
)
print("All flows triggered successfully!")
the issue with this approach is that I don't get to see all my deployed flows the way I am seeing when i am using the gathering of flows approach.
Ideally, I want all my flows to be executed in the sequential manner and I should be able to see the upcoming flows of my deployment, is there a way to achieve this?
Also, i don't see any advantage of using async/await here , even if i don't use async/await, the behaviour is the same, the sequence of execution and the way I see the flows in the UI is the same. please do clarify here.
Thanks.