truncated = False
if len(blocklist) > 20:
+ logger.warning("blocklist()=%d for domain='%s' has more than 20 records, truncating to 20 ...", len(blocklist), domain)
truncated = True
blocklist = blocklist[0 : 19]
allow_redirects=allow_redirects
)
response_time = time.perf_counter() - start
- logger.debug("response_time=%s", response_time)
-
+ logger.debug("Setting response_time=%s for domain='%s' ...", response_time, domain)
instances.set_last_response_time(domain, response_time)
logger.debug("response.ok='%s',response.status_code=%d,response.reason='%s',response_time=%s", response.ok, response.status_code, response.reason, response_time)
-
except exceptions as exception:
logger.debug("Fetching path='%s' from domain='%s' failed. exception[%s]='%s'", path, domain, type(exception), str(exception))
instances.set_last_error(domain, exception)
data = network.get_json_api(
domain,
request,
- headers,
- (config.get("nodeinfo_connection_timeout"), config.get("nodeinfo_read_timeout"))
+ headers=headers,
+ timeout=(config.get("nodeinfo_connection_timeout"), config.get("nodeinfo_read_timeout"))
)
logger.debug("data[]='%s'", type(data))
if "error_message" not in data and "json" in data:
- logger.debug("Success: request='%s' - Setting detection_mode=STATIC_CHECK ...", request)
+ logger.debug("Updating last_nodeinfo for domain='%s' ....", domain)
instances.set_last_nodeinfo(domain)
+
+ logger.debug("update_mode='%s'", update_mode)
if update_mode:
+ logger.debug("Success: request='%s' - Setting detection_mode=STATIC_CHECK for domain='%s' ...", request, domain)
instances.set_detection_mode(domain, "STATIC_CHECK")
+
+ logger.debug("domain='%s',request='%s'", domain, request)
instances.set_nodeinfo_url(domain, "https://{domain}{request}")
break