This is arguably the reason why you would want to use Infuse.
Currently, Infuse wraps two methods in Insanic’s
The private method that prepares and post processes the inter service communications
The private method that actually sends the request with
The wrapping of this method is really crucial to the functionality of the circuit breaker. However, there is a reason that this needed to be done.
For some requests, there are instances where you do not want to
break even on failure. So want infuse does is that it allows
you to bypass the circuit breaking functionality of Infuse by
sending in an extra keyword,
_dispatch_future flags the request as
non-breaking and just calls the
from insanic.loading import get_service service = get_service('some_service') response = await service.http_dispatch( 'GET', '/some/api/`, skip_breaker=True )
This is where the circuit breaking logic wraps the service method.
Within this decorator, a separate circuit breaking object is created
for each service and calls
checking that the status of the target service is CLOSED or
at least HALF-OPEN.
If Infuse deems it unsuitable to send a request, it will raise