Skip to main content

Module retry

Module retry 

Source
Expand description

Running a block again when it failed for a reason that is the world’s, not its own (docs/specs/SPEC_DRONE_GENERAL_AUTOMATION_2026_11_11.md §3.4).

A block opts in with retry: a number of retries (1 to 3), or { "max": 1 to 3, "backoff_seconds": 1 to 300 }. The wait doubles each time from backoff_seconds (2 when not set) and never passes five minutes.

Only infrastructure failures are retried: a network error, a 5xx or 429 answer from an API, a provider’s rate limit, a machine out of memory. A block that ran and failed on its own terms (a bad reducer, a refused URL, a timeout, an agent that said failed) is never run again, because running it again would only do the same thing, or do it twice.

Structs§

Retry 🔒

Constants§

DEFAULT_BACKOFF_SECONDS 🔒
MAX_BACKOFF_SECONDS 🔒
MAX_RETRIES 🔒
The most times a block is run again.

Functions§

again 🔒
Whether to run the block again after result, having run it ran times.
delay 🔒
How long to wait before retry number attempt (1 is the first retry).
is_infrastructure 🔒
Whether the error a block gave is the world’s doing.
is_infrastructure_output 🔒
Whether a block that finished gave an answer that says the other side was not ready: an API’s 429 or 5xx.
retry_of 🔒
A block’s retry, when it has one.