def _check_peers(peers):

    if not isinstance(peers, list):
        return False

    for peer in peers:
        if not isinstance(peer, str):
            return False

    ip_only_peers = list()
    for peer in peers:
        try:
            ip_only_peers.append(str(IPAddress(peer)))  # append the str value
        except AddrFormatError:
            # if not a valid IP Address
            dns_reply = list()
            try:
                # try to see if it is a valid NS
                dns_reply = dns.resolver.query(peer)
            except dns.resolver.NoAnswer:
                # no a valid DNS entry either
                continue
            for dns_ip in dns_reply:
                ip_only_peers.append(str(dns_ip))

    peers = ip_only_peers

    return True
Actually purges the crawlid from the queue
dataset/ETHPy150Open saltstack/salt/salt/states/netntp.py/_check_peers--crossover with--dataset/ETHPy150Open istresearch/scrapy-cluster/redis-monitor/plugins/stop_monitor.py/StopMonitor._mini_purge