oeharel
03/30/2024, 10:24 AMNate
03/30/2024, 1:55 PMoeharel
03/31/2024, 5:57 AMNate
03/31/2024, 4:00 PMSCHEDULED
-> PENDING
(because say its now their scheduled run time), and then the worker notices and picks up the first one but then crashes
you'd have N - 1 flow runs in PENDING
(which would get picked up as soon as there's a healthy worker to do so) and 1 CRASHED
flow runNate
03/31/2024, 4:00 PM"reset" feature which allows to start a flow from a certain stephow would you describe a "step" in this context?
oeharel
04/01/2024, 5:06 AM@flow
async def main_run():
await subflow_1()
await subflow_2()
await subflow_3()
If subflow_2
crashes (not only due to a system crash), what reset it Temporal basically allows me to do is start main_run
from subflow_2
meaning it'll still continue to subflow_3
.
To be more technical, they create events for every "landmark" in a run (which from my familiarity Prefect sort of has):
1. Flow scheduled
2. Flow started
3. Flow completed
4. .....
Then when you reset you can tell it to start from any of these events.
Very useful feature :)Nate
04/01/2024, 1:50 PMResults
and retries in prefect
if subflow 1 and 2 finish in completed and persist a result, then at any point in the future you could retry that main_run
and start from the first non-completed stateoeharel
04/02/2024, 4:13 AM