From: Roland Häder Date: Thu, 12 Oct 2023 23:17:07 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6fe2d1584daf320fae77a56312a44a61ce2bc9bf;p=fba.git Continued: - added parameter --no-detection for rechecking instances with no detection mode being set which might happen when the server is down or the used software was nowhere stated --- diff --git a/fba/boot.py b/fba/boot.py index a79e428..86411b7 100644 --- a/fba/boot.py +++ b/fba/boot.py @@ -224,6 +224,7 @@ def init_parser(): parser.add_argument("--force", action="store_true", help="Forces update of data, no matter what.") parser.add_argument("--no-software", action="store_true", help="Checks only entries with no software type detected.") parser.add_argument("--no-auto", action="store_true", help="Checks only entries with other than AUTO_DISCOVERY as detection mode.") + parser.add_argument("--no-detection", action="store_true", help="Checks only entries with no detection mode set.") ### Fetch instances from instances.social ### parser = subparser_command.add_parser( diff --git a/fba/commands.py b/fba/commands.py index 66bc80d..40b26fc 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1480,6 +1480,9 @@ def update_nodeinfo(args: argparse.Namespace) -> int: elif args.no_auto: logger.info("Fetching domains with other detection mode than AUTO_DISOVERY being set ...") database.cursor.execute("SELECT domain, software FROM instances WHERE detection_mode IS NOT NULL AND detection_mode != 'AUTO_DISCOVERY' ORDER BY last_updated ASC") + elif args.no_detection: + logger.info("Fetching domains with no detection mode being set ...") + database.cursor.execute("SELECT domain, software FROM instances WHERE detection_mode IS NULL ORDER BY last_updated ASC") else: logger.info("Fetching domains for recently updated ...") database.cursor.execute("SELECT domain, software FROM instances ORDER BY last_updated ASC")