From: Roland Häder Date: Wed, 24 May 2023 14:46:55 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=33daa5b4479bb7df07fe320c17ba55e828ee17f0;p=fba.git Continued: - output fetched rows so it is clear it might take some time to finish --- diff --git a/fetch_blocks.py b/fetch_blocks.py index a5aa9ea..7d4ce24 100644 --- a/fetch_blocks.py +++ b/fetch_blocks.py @@ -9,7 +9,9 @@ fba.cursor.execute( "SELECT domain, software FROM instances WHERE software IN ('pleroma', 'mastodon', 'friendica', 'misskey', 'gotosocial', 'bookwyrm', 'takahe') AND (last_blocked IS NULL OR last_blocked < ?) ORDER BY rowid DESC", [time.time() - fba.config["recheck_block"]] ) -for blocker, software in fba.cursor.fetchall(): +rows = fba.cursor.fetchall() +print(f"INFO: Checking {len(rows)} entries ...") +for blocker, software in rows: # NOISY-DEBUG: print("DEBUG: BEFORE blocker,software:", blocker, software) blockdict = [] blocker = fba.tidyup(blocker) diff --git a/fetch_instances.py b/fetch_instances.py index 6b8a8d8..9aebc35 100644 --- a/fetch_instances.py +++ b/fetch_instances.py @@ -67,7 +67,9 @@ fba.cursor.execute( "SELECT domain,software FROM instances WHERE software IN ('pleroma', 'mastodon', 'friendica', 'misskey', 'gotosocial', 'bookwyrm', 'takahe', 'lemmy') AND (last_nodeinfo IS NULL OR last_nodeinfo < ?) ORDER BY rowid DESC", [time.time() - fba.config["recheck_instance"]] ) -for row in fba.cursor.fetchall(): +rows = fba.cursor.fetchall() +print(f"INFO: Checking {len(rows)} entries ...") +for row in rows: # NOISY-DEBUG: print("DEBUG: domain:", row[0]) if fba.is_blacklisted(row[0]): print("WARNING: domain is blacklisted:", row[0])