Tanasorn Chindasook
05/16/2022, 2:32 PMKevin Kho
05/16/2022, 3:06 PMTanasorn Chindasook
05/17/2022, 9:05 AMTask 'wait_for_flow_run': Exception encountered during task execution!
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/prefect/engine/task_runner.py", line 884, in get_task_run_state
logger=self.logger,
File "/usr/local/lib/python3.7/site-packages/prefect/utilities/executors.py", line 468, in run_task_with_timeout
return task.run(*args, **kwargs) # type: ignore
File "/usr/local/lib/python3.7/site-packages/prefect/tasks/prefect/flow_run.py", line 264, in wait_for_flow_run
flow_run = FlowRunView.from_flow_run_id(flow_run_id)
File "/usr/local/lib/python3.7/site-packages/prefect/backend/flow_run.py", line 571, in from_flow_run_id
flow_run_data = cls._query_for_flow_run(where={"id": {"_eq": flow_run_id}})
File "/usr/local/lib/python3.7/site-packages/prefect/backend/flow_run.py", line 629, in _query_for_flow_run
f"Found multiple ({len(flow_runs)}) flow runs while querying for flow "
ValueError: Found multiple (134) flow runs while querying for flow runs
Anna Geller
05/17/2022, 12:09 PMprefect run --name flow1 --watch
prefect run --name flow2 --watch
prefect run --name flow3 --watch
this will trigger all 3 flows one after the other and the watch will ensure to start the next one only if the previous one is completed - you could do the same from Python with create_flow_run + wait_for_flow_run tasks