(self, host, port, sentinel_port, sentinel_name)
return host, port
:param host: Redis host to send request
        :param port: Redis port to send request
        :param sentinel_port: sentinel_port optional
        :param sentinel_name: sentinel_name optional
        :return: master ip and port
:param host: Redis host to send request
        :param port: Redis port to send request
        :param sentinel_port: sentinel_port optional
        :param sentinel_name: sentinel_name optional
        :return: master ip and port
: param host : Redis host to send request : param port : Redis port to send request : param sentinel_port : sentinel_port optional : param sentinel_name : sentinel_name optional : return : master ip and port
def get_master(self, host, port, sentinel_port, sentinel_name):
        """
        :param host: Redis host to send request
        :param port: Redis port to send request
        :param sentinel_port: sentinel_port optional
        :param sentinel_name: sentinel_name optional
        :return: master ip and port
        """
        if sentinel_port and sentinel_name:
            master = Sentinel([(host, sentinel_port)], socket_timeout=1)\
                .discover_master(sentinel_name)
            return master
        return host, port
def get_master ( self , host , port , sentinel_port , sentinel_name ) : if sentinel_port and sentinel_name : master = Sentinel ( [ ( host , sentinel_port ) ] , socket_timeout = 1 ) . discover_master ( sentinel_name ) return master return host , port