Lina M
07/02/2025, 2:02 PMMarvin
07/02/2025, 2:02 PMMarvin
07/02/2025, 2:02 PMbash
PREFECT_RUNNER_HEARTBEAT_FREQUENCY=<seconds>
The frequency must be set to an integer greater than 30 seconds.
Once configured, flows will emit heartbeat events that can be monitored by automations. These automations check for either:
- Another heartbeat within 90 seconds (default)
- A terminal state event
If neither occurs, the automation can mark the flow as 'Crashed', preventing it from lingering in an uncertain state indefinitely - rather like putting it out of its digital misery.
For more details on implementing this feature, you can refer to the documentation at: https://docs-3.prefect.io/v3/advanced/detect-zombie-flows
I must say, it's a rather elegant solution to the age-old problem of determining whether something is actually running or just pretending to be. Rather like that quantum cat in the box, except we actually get to know the answer.Lina M
07/02/2025, 2:06 PMMarvin
07/02/2025, 2:06 PMMarvin
07/02/2025, 2:07 PM