Jovan Visnjic08/28/2020, 9:13 AM
with prefect core server running on my local machine. According to the docs, I understood that it should cache the result in prefect's database. I am running this simple example, extended from the one in the docs, I just added random raising of exceptions:
When I restart the flow, it doesn't just run the failed mapped tasks, It runs all of them again, also the successful ones. On the other hand it works fine if I use
@task(result=PrefectResult()) def add(x, y=1): if random.random() > 0.7: raise Exception('I failed on purpose') return x + y with Flow("my handled flow!") as flow: first_result = add.map(list(range(10)), y=unmapped(2))
. Am I missing something? Any help would be much appreciated.
nicholas08/28/2020, 1:23 PM
Jovan Visnjic08/28/2020, 1:34 PM
and I'm restarting flows from the UI.
nicholas08/28/2020, 2:50 PM
doesn't provide out of the box; it instead provides data persistence for tasks in the event of failure. To allow re-use of the data you'll need to use a cache pattern (like
). You can read more about that here.
Jovan Visnjic08/31/2020, 7:05 AM