(self, command: commands.CloseCommand)
Client or worker wishes us to close down
Client or worker wishes us to close down
Client or worker wishes us to close down
async def handle_close(self, command: commands.CloseCommand):
        """Client or worker wishes us to close down"""
        await cancel(*self.consumer_tasks)
        await cancel(*self.listener_tasks)

        for rpc_transport in self.transport_registry.get_all_rpc_transports():
            await rpc_transport.close()
        for rpc_transport in self.transport_registry.get_all_result_transports():
            await rpc_transport.close()

        await self.consumer.close()
        await self.producer.close()
async def handle_close ( self , command : commands . CloseCommand ) : await cancel ( * self . consumer_tasks ) await cancel ( * self . listener_tasks ) for rpc_transport in self . transport_registry . get_all_rpc_transports ( ) : await rpc_transport . close ( ) for rpc_transport in self . transport_registry . get_all_result_transports ( ) : await rpc_transport . close ( ) await self . consumer . close ( ) await self . producer . close ( )