]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 3 Jun 2023 06:37:09 +0000 (08:37 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 3 Jun 2023 06:37:09 +0000 (08:37 +0200)
- renamed lock_process() to acquire_lock()

fba/boot.py
fetch_bkali.py
fetch_blocks.py
fetch_fba_rss.py
fetch_instances.py

index 8f962fc05e707505d32672f75c354b83fe6e4129..605d2ea8522c5ac432f96de7bc997f97c43722fa 100644 (file)
@@ -24,7 +24,7 @@ from fba import fba
 lockfile = tempfile.gettempdir() + '/fba.lock'
 LOCK = None
 
-def lock_process():
+def acquire_lock():
     global LOCK
     try:
         print(f"DEBUG: Acquiring lock: '{lockfile}'")
index f6b6fdb2e6c55919d36e7680917d0babe415e003..0dbefc0d6f905b350617b3185ae9241c4fa0b96e 100755 (executable)
@@ -22,7 +22,7 @@ import sys
 import validators
 from fba import *
 
-boot.lock_process()
+boot.acquire_lock()
 
 domains = list()
 try:
index c7f25f59ab36e287a8a80a68c876ffb6b3011bcb..900f1c0126593ef5ca4400a3cac7caf4e86b17df 100755 (executable)
@@ -25,7 +25,7 @@ import re
 import validators
 from fba import *
 
-boot.lock_process()
+boot.acquire_lock()
 
 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"]]
index 022f46e35a417eea0b5c60870724ab4ca51bdf70..4db5434a7c1d0646ec071eb7106b5084cac4f4b0 100755 (executable)
@@ -22,7 +22,7 @@ import rss_parser
 import sys
 from fba import *
 
-boot.lock_process()
+boot.acquire_lock()
 
 feed = sys.argv[1]
 
index 926ccf6d4a675088d859d8b5aa78079ff0351e65..08b49e84d0b36e3581c18c35e0760ce07eaf8a2c 100755 (executable)
@@ -24,7 +24,7 @@ import time
 import validators
 from fba import *
 
-boot.lock_process()
+boot.acquire_lock()
 
 instance = sys.argv[1]