minos.saga.middleware module

async minos.saga.middleware.transactional_command(request, inner)[source]

Execute the command transactionally if it comes from a saga.

Parameters
  • request (minos.networks.requests.Request) – The request containing the data.

  • inner (collections.abc.Callable[minos.networks.requests.Request, collections.abc.Awaitable[typing.Optional[minos.networks.requests.Response]]]) – The inner handling function to be executed.

Return type

typing.Optional[minos.networks.requests.Response]

Returns

The response generated by the inner handling function.