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

Persist queued jobs using atomic conditional updates and expiring leases.

Method __init__ Bind the queue driver to a framework database connection.
Async Method _ensureSchema Create the queue table on first use.
Method _ownershipClauses Require a current, unexpired reservation for a transition.
Async Method clear Remove every job in one logical queue.
Async Method close Leave the shared database connection under its manager's ownership.
Async Method delete Acknowledge an owned reservation by removing its row.
Async Method push Store an envelope for immediate or delayed consumption.
Async Method release Release an owned reservation for another attempt.
Async Method reserve Claim one eligible job in queue priority order.
Async Method size Count ready, delayed, and reserved jobs in one queue.
Class Variable __slots__ Undocumented
Instance Variable _connection Undocumented
Instance Variable _definition Undocumented
Instance Variable _ready Undocumented
Instance Variable _ready_lock Undocumented
def __init__(self, connection: IConnection, table: str = 'jobs'): (source)

Bind the queue driver to a framework database connection.

Parameters
connection:IConnectionShared framework connection used for queue persistence.
table:str, optionalLogical table name, with the connection prefix applied by DB.
Returns
NoneComplete the documented operation without returning a value.
async def _ensureSchema(self): (source)

Create the queue table on first use.

Returns
NoneEnsure the queue storage exists.
def _ownershipClauses(self, reserved: ReservedJob) -> list[WhereClause]: (source)

Require a current, unexpired reservation for a transition.

Parameters
reserved:ReservedJobReservation whose ownership must still hold.
Returns
list of WhereClausePredicates fencing reclaimed and expired reservations.
async def clear(self, queue: str) -> int: (source)

Remove every job in one logical queue.

Parameters
queue:strLogical queue whose jobs are removed.
Returns
intNumber of removed jobs, including active reservations.
async def close(self): (source)

Leave the shared database connection under its manager's ownership.

Returns
NonePreserve the framework-managed connection lifecycle.
async def delete(self, reserved: ReservedJob) -> bool: (source)

Acknowledge an owned reservation by removing its row.

Parameters
reserved:ReservedJobReservation owned by the acknowledging worker.
Returns
boolWhether a current reservation was removed.
async def push(self, envelope: JobEnvelope, delay: float = 0) -> str: (source)

Store an envelope for immediate or delayed consumption.

Parameters
envelope:JobEnvelopeImmutable serialized job configuration and state.
delay:float, optionalSeconds before the job becomes available.
Returns
strPersisted job identifier.
async def release(self, reserved: ReservedJob, delay: float = 0) -> bool: (source)

Release an owned reservation for another attempt.

Parameters
reserved:ReservedJobReservation owned by the releasing worker.
delay:float, optionalSeconds before the job becomes available again.
Returns
boolWhether a current reservation was released.
async def reserve(self, queues: tuple[str, ...], retry_after: float) -> ReservedJob | None: (source)

Claim one eligible job in queue priority order.

Parameters
queues:tuple of strLogical queues ordered from highest to lowest priority.
retry_after:floatLease duration in seconds.
Returns
ReservedJob or NoneAcquired reservation, or no available job.
Raises
QueueStorageErrorIf an ambient transaction would prevent committing the claim.
async def size(self, queue: str) -> int: (source)

Count ready, delayed, and reserved jobs in one queue.

Parameters
queue:strLogical queue whose jobs are counted.
Returns
intTotal number of persisted jobs in the queue.
_connection = (source)

Undocumented

_definition = (source)

Undocumented

Undocumented

_ready_lock = (source)

Undocumented