]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 2 Jul 2023 07:24:45 +0000 (09:24 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 2 Jul 2023 07:24:45 +0000 (09:24 +0200)
- added parameter --all to include also already registered instances

fba/boot.py
fba/commands.py

index 07b4a6093a0ce79125a3681586fe45ded782878f..191321a1c613094e93112378ecc149172ead4c47 100644 (file)
@@ -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!")
 
index 7e363115077cfa0a142d8ee898a0e63ba3a4d6e0..6e57c7e0fa7cb7f9099ae1f914186543899d35e9 100644 (file)
@@ -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