class documentation
class LifecycleMixin:
Mixin managing the lifecycle of classes with @resource decorated methods.
| Method | __init |
Determine the initialization order for a specific subclass. |
| Async Method | init |
Idempotent. Initialize all resources in dependency order. |
| Async Method | shutdown |
Idempotent. Run each resource's post-yield code in reverse dependency order. |
| Property | is |
Return True if initialized, False otherwise. |
| Property | lifecycle |
Return resolved init order (shutdown runs in reverse). |
| Property | lifecycle |
Return the lifecycle state. |
| Async Method | __close |
Undocumented |
| Async Method | __shutdown |
Shut down in reverse order, best-effort. Returns all caught exceptions. |
| Class Variable | __order |
Undocumented |
| Instance Variable | __generators |
Undocumented |
| Instance Variable | __state |
Undocumented |
Determine the initialization order for a specific subclass.
| Raises | |
CycleError | If there is a cycle in the dependency graph. |
Idempotent. Initialize all resources in dependency order.
On failure, rollback anything already started, in reverse.
| Raises | |
BaseException | Reraised exception from failed resource initialization. |
ExceptionGroup | If exceptions were caught during rollback. |