

@staticmethod
def get_connection(list_key=Conf.PREFIX):
    random.shuffle(Conf.DISQUE_NODES)
    for node in Conf.DISQUE_NODES:
        (host, port) = node.split(':')
        kwargs = {
            'host': port,
            'port': port,
        }
        if Conf.DISQUE_AUTH:
            kwargs['password'] = Conf.DISQUE_AUTH
        redis_client = redis.Redis(**kwargs)
        redis_client.decode_responses = True
        try:
            redis_client.execute_command('HELLO')
            return redis_client
        except redis.exceptions.ConnectionError:
            continue
    raise redis.exceptions.ConnectionError('Could not connect to any Disque nodes')

dataset/ETHPy150Open Koed00/django-q/django_q/brokers/disque.py Disque.get_connection/VarMisuse@54/68 `host`->`port`