Message Bus Handlers

Important

The synchronous version is generated from the async version

Async

async purgatory.service._async.message_handlers.register_circuit_breaker(cmd: CreateCircuitBreaker, uow: AsyncAbstractUnitOfWork) Context

Register circuit breaker in the repository

when receiving the CreateCircuitBreaker command.

async purgatory.service._async.message_handlers.save_circuit_breaker_state(evt: ContextChanged, uow: AsyncAbstractUnitOfWork) None

Save the circuit breaker state in the repository

when receiving the ContextChanged event.

async purgatory.service._async.message_handlers.inc_circuit_breaker_failure(evt: CircuitBreakerFailed, uow: AsyncAbstractUnitOfWork) None

Increment the number of failure in the repository

when receiving the CircuitBreakerFailed event.

async purgatory.service._async.message_handlers.reset_failure(evt: CircuitBreakerRecovered, uow: AsyncAbstractUnitOfWork) None

Reset the number of failure in the repository

when receiving the CircuitBreakerRecovered event.

Sync

purgatory.service._sync.message_handlers.register_circuit_breaker(cmd: CreateCircuitBreaker, uow: SyncAbstractUnitOfWork) Context

Register circuit breaker in the repository

when receiving the CreateCircuitBreaker command.

purgatory.service._sync.message_handlers.save_circuit_breaker_state(evt: ContextChanged, uow: SyncAbstractUnitOfWork) None

Save the circuit breaker state in the repository

when receiving the ContextChanged event.

purgatory.service._sync.message_handlers.inc_circuit_breaker_failure(evt: CircuitBreakerFailed, uow: SyncAbstractUnitOfWork) None

Increment the number of failure in the repository

when receiving the CircuitBreakerFailed event.

purgatory.service._sync.message_handlers.reset_failure(evt: CircuitBreakerRecovered, uow: SyncAbstractUnitOfWork) None

Reset the number of failure in the repository

when receiving the CircuitBreakerRecovered event.