peerlist = list()
logger.debug("software='%s'", software)
if software is not None:
- try:
- logger.debug("Fetching instances for domain='%s',software='%s',origin='%s'", domain, software, origin)
- peerlist = fetch_peers(domain, software, origin)
- except network.exceptions as exception:
- logger.warning("Cannot fetch peers from domain='%s',software='%s': '%s'", domain, software, type(exception))
+ logger.debug("Fetching instances for domain='%s',software='%s',origin='%s'", domain, software, origin)
+ peerlist = fetch_peers(domain, software, origin)
logger.debug("peerlist[]='%s'", type(peerlist))
if isinstance(peerlist, list):
elif not isinstance(timeout, tuple):
raise ValueError(f"timeout[]='{type(timeout)}' is not of type 'tuple'")
+ start = 0
try:
logger.debug("Sending GET request to '%s%s' ...", domain, path)
start = time.perf_counter()
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)
+
+ response_time = time.perf_counter() - start
+ logger.debug("Setting response_time=%s for domain='%s' ...", response_time, domain)
+ instances.set_last_response_time(domain, response_time)
+
raise exception
logger.debug("response[]='%s' - EXIT!", type(response))