Unit Of Work

Important

The synchronous version is generated from the async version

Async

Unit of work

class purgatory.service._async.unit_of_work.AsyncAbstractUnitOfWork
contexts: AsyncAbstractRepository
collect_new_events() → Generator[Message, None, None]
async initialize() → None

Override to initialize repositories.

abstract async commit() → None

Commit the transation.

abstract async rollback() → None

Rollback the transation.

class purgatory.service._async.unit_of_work.AsyncInMemoryUnitOfWork
async commit() → None

Do nothing.

async rollback() → None

Do nothing.

class purgatory.service._async.unit_of_work.AsyncRedisUnitOfWork(url: str)
async initialize() → None

Override to initialize repositories.

async commit() → None

Do nothing.

async rollback() → None

Do nothing.

Sync

Unit of work

class purgatory.service._sync.unit_of_work.SyncAbstractUnitOfWork
contexts: SyncAbstractRepository
collect_new_events() → Generator[Message, None, None]
initialize() → None

Override to initialize repositories.

abstract commit() → None

Commit the transation.

abstract rollback() → None

Rollback the transation.

class purgatory.service._sync.unit_of_work.SyncInMemoryUnitOfWork
commit() → None

Do nothing.

rollback() → None

Do nothing.

class purgatory.service._sync.unit_of_work.SyncRedisUnitOfWork(url: str)
initialize() → None

Override to initialize repositories.

commit() → None

Do nothing.

rollback() → None

Do nothing.