]> git.mxchange.org Git - fba.git/blobdiff - fetch_blocks.py
Continued:
[fba.git] / fetch_blocks.py
index 86e51621afa021410f10ce9bbde5939b2c8645a4..b5a49c4f98814f797b22446506a4e015a1ea8c2f 100755 (executable)
@@ -25,6 +25,8 @@ import re
 import validators
 import fba
 
+fba.lock_process()
+
 fba.cursor.execute(
     "SELECT domain, software, origin, nodeinfo_url 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"]]
 )
@@ -546,4 +548,4 @@ for blocker, software, origin, nodeinfo_url in rows:
 
     blockdict = []
 
-fba.connection.close()
+fba.shutdown()