https://prefect.io logo
Title
s

Stéphan Taljaard

03/17/2022, 7:16 PM
For 😛refect: 2.0 - do you have some general guidelines to use to decide if I should decorate a function(s) with
task
or
flow
(i.e. subflows)?
k

Kevin Kho

03/17/2022, 7:21 PM
I think the paradigm is a lot more flexible but for me it would boil down to that flows have properties that tasks don;t (schedules, storage, FlowRunner). I would personally say keep stuff as tasks until you need one of those properties. Also, flows that group tasks will support retrying together if not already. A common request in Prefect 1 was to retry upstream tasks if a downstream one fails. I think it also depends what you need visibility for in the UI and you can think about how you would filter for failed flows/tasks