From: Roland Häder Date: Thu, 15 Feb 2024 13:30:07 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c8582b40f24febc70dd17e43c9a2b1c28af9c079;p=fba.git Continued: - first simple variable checks - next "lighter" functions being invoked - last "heavy" function, which means possible database queries --- diff --git a/fba/commands.py b/fba/commands.py index 9dcbd41..a55b2f1 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -990,10 +990,10 @@ def fetch_instances(args: argparse.Namespace) -> int: logger.info("Checking %d entries ...", len(rows)) for row in rows: logger.debug("row[domain]='%s',row[origin]='%s',row[software]='%s'", row["domain"], row["origin"], row["software"]) - if instances.is_registered(row["domain"]) and row["software"] is None: + if row["software"] is None and instances.is_registered(row["domain"]) : logger.warning("row[domain]='%s' has no software detected. You can try to run ./fba.py update_nodeinfo --domain=%s --force to get it updated - SKIPPED!", row["domain"], row["domain"]) continue - elif instances.is_registered(row["domain"]) and software_helper.is_relay(row["software"]): + elif software_helper.is_relay(row["software"]) and instances.is_registered(row["domain"]): logger.warning("row[domain]='%s' is of software type '%s' which is not supported by this command. Please invoke fetch_relays instead - SKIPPED!", row["domain"], row["software"]) continue elif not args.force and not args.software in [None, ""]and instances.is_recent(row["domain"]):