- added parameter --no-software which fetching instances with no software
detected and not recently being checked
- the parameter --force is not re-checking recently entries. If you want this
you need to use ./nodeinfo.sh --software --force but be kind to other
webmasters!
parser.add_argument("--domain", help="Instance name (aka. domain)")
parser.add_argument("--software", help="Name of software, e.g. 'lemmy'")
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.")
### Fetch instances from instances.social ###
parser = subparser_command.add_parser(
elif args.software is not None and args.software != "":
logger.info("Fetching domains for args.software='%s'", args.software)
database.cursor.execute("SELECT domain, software FROM instances WHERE software = ?", [args.software])
+ elif args.no_software:
+ logger.info("Fetching domains with no software type detected ...")
+ database.cursor.execute("SELECT domain, software FROM instances WHERE software IS NULL AND (last_nodeinfo < ? OR last_nodeinfo IS NULL)", [time.time() - config.get("recheck_nodeinfo")])
else:
logger.info("Fetching domains for recently updated ...")
database.cursor.execute("SELECT domain, software FROM instances WHERE last_nodeinfo < ? OR last_nodeinfo IS NULL", [time.time() - config.get("recheck_nodeinfo")])