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 DatabaseFailedJobRepository(_DatabaseStorage, IFailedJobRepository): (source)
Constructor: DatabaseFailedJobRepository(connection, table)
Retain failed envelopes and diagnostics in framework-owned DB storage.
| Method | __init__ |
Bind failure storage to a framework database connection. |
| Async Method | all |
Return recorded failures in chronological order. |
| Async Method | close |
Leave the shared database connection under its manager's ownership. |
| Async Method | find |
Find one persisted failure by identifier. |
| Async Method | forget |
Remove one recorded failure. |
| Async Method | record |
Record a terminal failure once for this reservation token. |
| Class Variable | __slots__ |
Declare the instance attribute slots reserved by this class. |
| Instance Variable | _connection |
Shared framework connection used for failure persistence. |
| Instance Variable | _definition |
Original declaration from which runtime metadata was compiled. |
| Instance Variable | _ready |
Ready flag used by DatabaseFailedJobRepository. |
| Instance Variable | _ready |
Synchronization primitive controlling access to ready lock. |
Inherited from _DatabaseStorage:
| Async Method | _ensure |
Create the queue table on first use. |
Bind failure storage to a framework database connection.
| Parameters | |
connection:orionis.database.contracts.IConnection | Shared framework connection used for failure persistence. |
table:str, optional | Logical table name for recorded failures. |
| Returns | |
None | Complete the documented operation without returning a value. |
Return recorded failures in chronological order.
| Returns | |
tuple of orionis.queues.entities.failed_job.FailedJob | Persisted failed jobs ordered by timestamp and identifier. |
Leave the shared database connection under its manager's ownership.
| Returns | |
None | Preserve the framework-managed connection lifecycle. |
Find one persisted failure by identifier.
| Parameters | |
failurestr | Stable failure identifier returned by the repository. |
| Returns | |
orionis.queues.entities.failed_job.FailedJob or None | Recorded failure or no matching record. |
async def record(self:
Self, reserved: ReservedJob, connection: str, exception: BaseException) -> FailedJob:
(source)
¶
Record a terminal failure once for this reservation token.
| Parameters | |
reserved:orionis.queues.entities.reserved_job.ReservedJob | Reservation whose encoded envelope must remain retryable. |
connection:str | Queue connection on which the job failed. |
exception:BaseException | Original failure including its traceback. |
| Returns | |
orionis.queues.entities.failed_job.FailedJob | Persisted failure or its existing idempotent record. |
| Raises | |
orionis.database.QueryException | If insertion fails and recovery cannot confirm an existing record. Preserve the insertion error and observe a failed recovery read. |