@router.get(_base_url + "/api/scoreboard.json", response_class=JSONResponse)
def api_scoreboard(mode: str, amount: int) -> None:
- if mode is None or value is None or amount is None:
+ if mode is None or amount is None:
raise HTTPException(status_code=500, detail="No filter specified")
elif amount <= 0:
raise HTTPException(status_code=500, detail=f"amount={amount} is to small")
)
parser.set_defaults(command=commands.fetch_instances)
parser.add_argument("--domain", help="Instance name (aka. domain) to fetch further instances from. Start with a large instance, for example mastodon.social .")
- parser.add_argument("--force-all", action="store_true", help="Include also already existing instances, otherwise only new are checked")
+ 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("--software", help="Name of software, for example 'lemmy'")
### Fetch blocks from static text file(s) ###
help="Fetches text/plain files as simple domain lists",
)
parser.set_defaults(command=commands.fetch_txt)
- 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.")
### Fetch blocks from joinfediverse.wiki ###
#parser = subparser_command.add_parser(
elif software_helper.is_relay(row["software"]):
logger.warning("row[domain]='%s' is a relay of type '%s' which is not supported by this command. Please invoke fetch_relays instead - SKIPPED!", row["domain"], row["software"])
continue
- elif not args.force_all and not args.software in [None, ""] and instances.is_recent(row["domain"]):
+ elif not args.force_all and not args.force_recrawl and instances.is_recent(row["domain"]):
logger.debug("row[domain]='%s' has recently been crawled - SKIPPED!", row["domain"])
continue
elif not domain_helper.is_wanted(domain):
logger.debug("domain='%s' is not wanted - SKIPPED!", domain)
continue
- elif not args.force_all and instances.is_registered(domain):
+ elif not args.force_all and not args.force_recrawl and instances.is_registered(domain):
logger.debug("domain='%s' is already registered - SKIPPED!", domain)
continue