From: Roland Häder Date: Tue, 11 Jul 2023 02:32:43 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b5a5fb2a8b372dd2303779d5d981c0343fdb5e04;p=fba.git Continued: - updating distinct domain nodeinfos can be forced --- diff --git a/fba/boot.py b/fba/boot.py index 15f29a1..9778391 100644 --- a/fba/boot.py +++ b/fba/boot.py @@ -190,6 +190,7 @@ def init_parser(): parser.set_defaults(command=commands.update_nodeinfo) 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.") ### Fetch instances from instances.social ### parser = subparser_command.add_parser( diff --git a/fba/commands.py b/fba/commands.py index 106964d..e6008de 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1607,7 +1607,7 @@ def update_nodeinfo(args: argparse.Namespace) -> int: software = federation.determine_software(row["domain"]) logger.debug("Determined software='%s'", software) - if software != row["software"] and software is not None: + if (software != row["software"] and software is not None) or args.force == True: logger.warning("Software type for row[domain]='%s' has changed from '%s' to '%s'!", row["domain"], row["software"], software) instances.set_software(row["domain"], software)