From: Roland Häder Date: Sun, 2 Jul 2023 07:24:45 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=619267e6e86ce951d318bbf5b420b497a23d283d;p=fba.git Continued: - added parameter --all to include also already registered instances --- diff --git a/fba/boot.py b/fba/boot.py index 07b4a60..191321a 100644 --- a/fba/boot.py +++ b/fba/boot.py @@ -179,6 +179,7 @@ def init_parser(): ) parser.set_defaults(command=commands.fetch_fedilist) parser.add_argument("--software", help="Name of software, e.g. 'lemmy'") + parser.add_argument("--all", action="store_true", help="Include also already existing instances, otherwise only new are checked") logger.debug("EXIT!") diff --git a/fba/commands.py b/fba/commands.py index 7e36311..6e57c7e 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1314,6 +1314,9 @@ def fetch_fedilist(args: argparse.Namespace) -> int: elif not utils.is_domain_wanted(domain): logger.warning("domain='%s' is not wanted - SKIPPED!", domain) continue + elif args.all is None or not args.all and instances.is_registered(domain): + logger.debug("domain='%s' is already registered, --all not specified: args.all[]='%s'", type(args.all)) + continue elif instances.is_recent(domain): logger.debug("domain='%s' has been recently crawled - SKIPPED!", domain) continue