From: Roland Häder Date: Sun, 25 Jun 2023 05:28:14 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=756ecc88b2d2d44f65732db186330196287fc820;p=fba.git Continued: - exclude instances with no nodeinfo URL --- diff --git a/fba/commands.py b/fba/commands.py index 0430ca9..f19d51b 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -214,12 +214,12 @@ def fetch_blocks(args: argparse.Namespace) -> int: # Re-check single software logger.debug("Querying database for args.software='%s' ...", args.software) database.cursor.execute( - "SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software = ?", [args.software] + "SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software = ? AND nodeinfo_url IS NOT NULL", [args.software] ) else: # Re-check after "timeout" (aka. minimum interval) database.cursor.execute( - "SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'peertube') AND (last_blocked IS NULL OR last_blocked < ?) ORDER BY rowid DESC", [time.time() - config.get("recheck_block")] + "SELECT domain, software, origin, nodeinfo_url FROM instances WHERE software IN ('pleroma', 'mastodon', 'lemmy', 'friendica', 'misskey', 'peertube') AND (last_blocked IS NULL OR last_blocked < ?) AND nodeinfo_url IS NOT NULL ORDER BY rowid DESC", [time.time() - config.get("recheck_block")] ) rows = database.cursor.fetchall()