THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
class documentation
class RedisResolverLease: (source)
Constructor: RedisResolverLease(backend, key, lease, wait_timeout)
Poll a Redis NX lease rather than relying on process-local waiter events.
| Async Method | __aenter__ |
Acquire a distributed lease with a finite waiting budget. |
| Async Method | __aexit__ |
Finish bounded ownership cleanup before propagating cancellation. |
| Method | __init__ |
Retain bounded acquisition settings and a unique release token. |
| Async Method | _acquire |
Poll atomic acquisition until cancellation or the outer timeout. |
| Async Method | _release |
Delete only this owner's lease, including after an uncertain acquisition. |
| Instance Variable | _backend |
Storage backend implementing the cache operations. |
| Instance Variable | _key |
Cache or lease key to access. |
| Instance Variable | _lease |
Lease lifetime in seconds; use the store default when omitted. |
| Instance Variable | _owner |
Ownership token used to identify the current holder. |
| Instance Variable | _wait |
Maximum number of seconds to wait for ownership. |
Acquire a distributed lease with a finite waiting budget.
| Returns | |
typing.Self | This lease after successful ownership acquisition. |
async def __aexit__(self:
Self, _type: type[ BaseException] | None, _value: BaseException | None, _traceback: TracebackType | None):
(source)
¶
Finish bounded ownership cleanup before propagating cancellation.
| Parameters | |
_type:type[BaseException] | None | Exception type raised by the context body, if any. |
_value:BaseException | None | Exception raised by the context body, if any. |
_traceback:types.TracebackType | None | Traceback attached to the context exception, if any. |
| Returns | |
None | No return value. |
| Raises | |
Exception | If release fails and the protected operation succeeded. |
Retain bounded acquisition settings and a unique release token.
| Parameters | |
backend:typing.Any | Storage backend implementing the cache operations. |
key:str | Cache or lease key to access. |
lease:float | Lease lifetime in seconds; use the store default when omitted. |
waitfloat | Maximum number of seconds to wait for ownership. |
| Returns | |
None | No return value. |
Delete only this owner's lease, including after an uncertain acquisition.
| Returns | |
None | No return value. |