https://prefect.io logo
n

Nikhil Joseph

07/03/2023, 8:41 AM
Hi, in a flow with subflows, if a subflow fails at a task and I retry the parent flow. the parent flow creates a new subflow run and starts all the tasks in it(completed or otherwise). I was expecting it to run the same subflow and continue with the failed task. Am I not understanding the logic or am I missing a settings somewhere?
d

Deceivious

07/04/2023, 12:34 PM
the solution is to persist the subflow results onto a remote cache
n

Nikhil Joseph

07/04/2023, 3:33 PM
you mean setting
result_storage
for a flow right? have set that up for all the flows(including subflows)
d

Deceivious

07/04/2023, 3:34 PM
Also the cache
Not just storage
n

Nikhil Joseph

07/04/2023, 3:34 PM
I see, could you send me a link to an example that uses this
Copy code
persist_result: Optional[bool] = None,
cache_result_in_memory: bool = True,
n

Nikhil Joseph

07/04/2023, 3:38 PM
oh do you mean
cache_result_in_memory
? does this work when a flow fails n I retry it from the dashboard?
d

Deceivious

07/04/2023, 3:39 PM
if its in memory it wont be shared between 2 flow runs
I am not sure anymore tbh. Atleast tasks can be cached - I thought subflows could be cached as well. Ill check tomorrow.
2 Views