From 6c296c3bade88f87dff8d2f5fbca5c99dfd1b95e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 24 Jul 2023 07:04:51 +0200 Subject: [PATCH] Optimized: - first simple checks then invoke methods - recheck_obfuscation() is about block lists, not instances, therefore we need to check 'last_blocked' timestamp --- fba/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fba/commands.py b/fba/commands.py index 6974862..08b9dda 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1481,7 +1481,7 @@ def recheck_obfuscation(args: argparse.Namespace) -> int: logger.info("Checking %d domains ...", len(rows)) for row in rows: logger.debug("Fetching peers from domain='%s',software='%s',nodeinfo_url='%s' ...", row["domain"], row["software"], row["nodeinfo_url"]) - if (args.force is None or not args.force) and instances.is_recent(row["domain"]) and args.domain is None and args.software is None: + if (args.force is None or not args.force) and args.domain is None and args.software is None and instances.is_recent(row["domain"], "last_blocked"): logger.debug("row[domain]='%s' has been recently checked, args.force[]='%s' - SKIPPED!", row["domain"], type(args.force)) continue -- 2.39.5