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 JobContext: (source)
Constructor: JobContext(driver, reserved, connection, fail)
Expose the current reservation and explicit lifecycle operations.
| Method | __init__ |
Bind operational state to one job execution. |
| Method | _require |
Reject repeated transitions on a completed context. |
| Async Method | delete |
Acknowledge the job and remove its reservation. |
| Async Method | fail |
Persist a terminal error and acknowledge the reservation. |
| Async Method | release |
Release the reservation for another attempt. |
| Class Variable | __slots__ |
Undocumented |
| Instance Variable | _connection |
Undocumented |
| Instance Variable | _driver |
Undocumented |
| Instance Variable | _fail |
Undocumented |
| Instance Variable | _failure |
Undocumented |
| Instance Variable | _finished |
Undocumented |
| Instance Variable | _reserved |
Undocumented |
| Property | attempts |
Return the number of reservations including this execution. |
| Property | connection |
Return the logical backend connection name. |
| Property | failure |
Return an explicitly reported terminal exception. |
| Property | finished |
Report whether an explicit lifecycle operation completed. |
| Property | id |
Return the immutable job identifier. |
| Property | queue |
Return the logical queue name. |
def __init__(self, driver:
IQueueDriver, reserved: ReservedJob, connection: str, fail: FailureCallback):
(source)
¶
Bind operational state to one job execution.
| Parameters | |
driver:IQueueDriver | Driver owning the reservation. |
reserved:ReservedJob | Current fenced reservation. |
connection:str | Logical connection name. |
fail:FailureCallback | Callback persisting a terminal failure. |
| Returns | |
None | Complete the documented operation without returning a value. |
Reject repeated transitions on a completed context.
| Returns | |
None | Complete the documented operation without returning a value. |
| Raises | |
QueueLeaseError | If a lifecycle operation already completed. |
Acknowledge the job and remove its reservation.
| Returns | |
None | Complete the documented operation without returning a value. |
| Raises | |
QueueLeaseError | If the reservation is no longer owned by this execution. |
Report whether an explicit lifecycle operation completed.
| Returns | |
bool | Whether automatic worker acknowledgement must be skipped. |