ORIONIS API REFERENCE

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

Expose the current reservation and explicit lifecycle operations.

Method __init__ Bind operational state to one job execution.
Method _requireActive 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__ Declare the instance attribute slots reserved by this class.
Instance Variable _connection Logical connection name.
Instance Variable _driver Driver owning the reservation.
Instance Variable _fail Callback persisting a terminal failure.
Instance Variable _failure Failure retained for propagation or reporting.
Instance Variable _finished Finished flag used by JobContext.
Instance Variable _reserved Current fenced reservation.
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:orionis.queues.contracts.driver.IQueueDriverDriver owning the reservation.
reserved:orionis.queues.entities.reserved_job.ReservedJobCurrent fenced reservation.
connection:strLogical connection name.
fail:orionis.queues.context.FailureCallbackCallback persisting a terminal failure.
Returns
NoneComplete the documented operation without returning a value.
def _requireActive(self): (source)

Reject repeated transitions on a completed context.

Returns
NoneComplete the documented operation without returning a value.
Raises
orionis.queues.exceptions.QueueLeaseErrorIf a lifecycle operation already completed.
async def delete(self): (source)

Acknowledge the job and remove its reservation.

Returns
NoneComplete the documented operation without returning a value.
Raises
orionis.queues.exceptions.QueueLeaseErrorIf the reservation is no longer owned by this execution.
async def fail(self, exception: Exception): (source)

Persist a terminal error and acknowledge the reservation.

Parameters
exception:ExceptionOriginal application exception.
Returns
NoneComplete the documented operation without returning a value.
Raises
orionis.queues.exceptions.QueueLeaseErrorIf the reservation is no longer owned by this execution.
async def release(self, delay: float = 0.0): (source)

Release the reservation for another attempt.

Parameters
delay:float, optionalNonnegative delay in seconds.
Returns
NoneComplete the documented operation without returning a value.
Raises
orionis.queues.exceptions.QueueConfigurationErrorIf the delay is invalid.
orionis.queues.exceptions.QueueLeaseErrorIf the reservation is no longer owned by this execution.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

_connection = (source)

Logical connection name.

Driver owning the reservation.

Callback persisting a terminal failure.

Failure retained for propagation or reporting.

_finished: bool = (source)

Finished flag used by JobContext.

_reserved = (source)

Current fenced reservation.

Return the number of reservations including this execution.

Returns
intOne-based attempt count.

Return the logical backend connection name.

Returns
strConfigured connection name.

Return an explicitly reported terminal exception.

Returns
Exception | NoneError passed to fail.

Report whether an explicit lifecycle operation completed.

Returns
boolWhether automatic worker acknowledgement must be skipped.

Return the immutable job identifier.

Returns
strDispatch identifier.

Return the logical queue name.

Returns
strChannel containing the job.