From 33daa5b4479bb7df07fe320c17ba55e828ee17f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 24 May 2023 16:46:55 +0200 Subject: [PATCH] Continued: - output fetched rows so it is clear it might take some time to finish --- fetch_blocks.py | 4 +++- fetch_instances.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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]) -- 2.39.5