parser.add_argument("--domain", help="Instance name (aka. domain)")
parser.add_argument("--software", help="Name of software, e.g. 'lemmy'")
parser.add_argument("--mode", help="Name of detection mode, e.g. 'auto_discovery'")
- parser.add_argument("--force-all", action="store_true", help="Forces update of data, no matter what.")
+ parser.add_argument("--force-all", action="store_true", help="Forces update of data, no matter what. Replaces all force parameters below.")
+ parser.add_argument("--force-recrawl", action="store_true", help="Forces recrawling all found instances. Can still be limited by --software or any --no-* parameters.")
+ parser.add_argument("--force-update-none", action="store_true", help="Forces updating 'None' value for software (else it won't be updated).")
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.")
elif blacklist.is_blacklisted(row["domain"]):
logger.debug("row[domain]='%s' is blacklisted - SKIPPED!", row["domain"])
continue
- elif not args.force_all and instances.is_recent(row["domain"], "last_nodeinfo"):
+ elif not args.force_all and not args.force_recrawl and instances.is_recent(row["domain"], "last_nodeinfo"):
logger.debug("row[domain]='%s' has recently been checked - SKIPPED!", row["domain"])
continue
software = federation.determine_software(row["domain"])
logger.debug("Determined software='%s'", software)
- if (software != row["software"] and software is not None) or args.force_all is True:
+ if (software != row["software"] and software is not None) or args.force_all is True or args.force_update_none is True:
logger.debug("software='%s'", software)
if software is None:
logger.debug("Setting nodeinfo_url to 'None' for row[domain]='%s' ...", row["domain"])