elif instances.is_registered(entry["domain"]):
# DEBUG: print(f"DEBUG: domain='{entry['domain']}' is already registered - SKIPPED!")
continue
+ elif instances.is_recent(entry["domain"]):
+ # DEBUG: print(f"DEBUG: domain='{entry['domain']}' has been recently fetched - SKIPPED!")
+ continue
# DEBUG: print(f"DEBUG: Adding domain='{entry['domain']}' ...")
domains.append(entry["domain"])
print(f"WARNING: Exception '{type(exception)}' during fetching instances (fetch_bkali) from domain='{domain}'")
instances.set_last_error(domain, exception)
- # DEBUG: print("DEBUG: EXIT!")
+ # DEBUG: print("DEBUG: Success - EXIT!")
return 0
def fetch_blocks(args: argparse.Namespace):
print(f"WARNING: Exception '{type(exception)}' during fetching instances (fetch_instances) from domain='{row[0]}'")
instances.set_last_error(row[0], exception)
- # DEBUG: print("DEBUG: EXIT!")
+ # DEBUG: print("DEBUG: Success - EXIT!")
return 0
def fetch_oliphant(args: argparse.Namespace):
instances.set_last_instance_fetch(domain)
# DEBUG: print(f"DEBUG: software for domain='{domain}' is not set, determining ...")
- software = determine_software(domain, path)
+ software = None
+ try:
+ software = determine_software(domain, path)
+ except network.exceptions as exception:
+ print(f"DEBUG: Exception '{type(exception)}' during determining software type")
+
# DEBUG: print(f"DEBUG: Determined software='{software}' for domain='{domain}'")
elif not isinstance(software, str):
raise ValueError(f"Parameter software[]='{type(software)}' is not 'str'")
return
elif not validators.domain(domain.split("/")[0]):
raise ValueError(f"domain='{domain}' is not a valid domain")
- elif not instances.is_registered(domain.split("/")[0]):
+
+ if not instances.is_registered(domain.split("/")[0]):
# DEBUG: print("DEBUG: Adding new domain:", domain, origin)
instances.add(domain, origin, command, path)