teff.node.retry¶
teff.node.retry
¶
Retry wrapper node with configurable attempts, backoff, and timeout.
Classes:
| Name | Description |
|---|---|
Retry |
Wrap a node with retry logic. |
Functions:
| Name | Description |
|---|---|
wrap_with_retry |
Wrap node in a :class: |
Retry
¶
Bases: Node
Wrap a node with retry logic.
Retries the inner node up to max_retries attempts total. Between
attempts it waits delay seconds (scaled by backoff per retry,
e.g. backoff=2.0 gives delay, 2×, 4×, …). Each attempt is bounded
by timeout seconds when set. retry_on restricts which failures are
retried (exception type names or HTTP status codes); by default any
exception is retried.
Config (all optional): max_retries (default 3), delay (default
0.0), backoff (default 1.0), timeout (default None),
retry_on (default [] = all).
Source code in teff/node/retry.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
wrap_with_retry
¶
wrap_with_retry(node, config)
Wrap node in a :class:Retry when config enables it.
Accepts the YAML retry: block (max_retries, delay,
backoff, timeout, retry_on). Returns the node unchanged
when config is empty or the block is explicitly disabled.
Source code in teff/node/retry.py
99 100 101 102 103 104 105 106 107 108 109 110 111 | |