Hi all, is there a best practice to prevent race c...
# best-practices
w
Hi all, is there a best practice to prevent race conditions between flows?
k
If a flow must finish before the other, they should be subflows. These run sequentially inside a parent flow. (This allows data passing but you don't have to use it). https://docs.prefect.io/concepts/flows/#composing-flows
Or, tasks have a
wait_for
parameter .. i'm still learning about this. I'm guessing this param only matters when you use a parallel Task runner. (somebody else please confirm). The default behavior for tasks is the same as flow - blocking, and are run sequentially (so you don't actually need wait_for) 🙂 https://docs.prefect.io/concepts/tasks/#wait-for https://discourse.prefect.io/t/are-there-any-guidelines-when-to-use-flow-vs-task-decora[…]flow-should-be-defined-at-a-task-subflow-vs-flow-level/522 Good luck!