tformat = config.get("timestamp_format")
instance = dict()
for key in domain_data.keys():
- if key in ["last_nodeinfo", "last_blocked", "first_seen", "last_updated", "last_instance_fetch", "last_response_time"] and isinstance(domain_data[key], float):
+ if key in ["last_nodeinfo", "last_blocked", "first_seen", "last_updated", "last_instance_fetch" and isinstance(domain_data[key], float):
# Timestamps
instance[key] = datetime.utcfromtimestamp(domain_data[key]).strftime(tformat)
else:
logger.debug("Invoking instances.set_total_peerlist(%s,%d) ...", domain, len(peerlist))
instances.set_total_peers(domain, peerlist)
+ logger.debug("Invoking cookies.clear(%s) ...", domain)
+ cookies.clear(domain)
+
logger.debug("peerlist[]='%s'", type(peerlist))
if peerlist is None:
logger.warning("Cannot fetch peers: domain='%s',software='%s'", domain, software)
logger.debug("Flushing updates for domain='%s' ...", domain)
instances.update(domain)
- logger.debug("Invoking cookies.clear(%s) ...", domain)
- cookies.clear(domain)
-
_DEPTH = _DEPTH - 1
logger.debug("EXIT!")
return
elif len(peerlist) == 0:
- logger.debug("domain='%s',software='%s' has an empty peer list returned - EXIT!", domain, software)
+ logger.info("domain='%s' returned an empty peer list.", domain)
+
+ if instances.has_pending(domain):
+ logger.debug("Flushing updates for domain='%s' ...", domain)
+ instances.update(domain)
+
_DEPTH = _DEPTH - 1
+ logger.debug("domain='%s',software='%s' has an empty peer list returned - EXIT!", domain, software)
return
logger.info("Checking %d instance(s) from domain='%s',software='%s',depth=%d ...", len(peerlist), domain, software, _DEPTH)
logger.debug("Adding instance='%s',domain='%s',command='%s',_DEPTH=%d ...", instance, domain, command, _DEPTH)
instances.add(instance, domain, command)
- logger.debug("Invoking cookies.clear(%s) ...", domain)
- cookies.clear(domain)
-
logger.debug("Checking if domain='%s' has pending updates ...", domain)
if instances.has_pending(domain):
logger.debug("Flushing updates for domain='%s' ...", domain)