]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 25 Jun 2023 15:43:56 +0000 (17:43 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 25 Jun 2023 15:43:56 +0000 (17:43 +0200)
- debug message added

fba/http/federation.py
fba/networks/lemmy.py
fba/networks/mastodon.py
fba/utils.py

index 7d5d97c38552e937769a7705164d9eac519f9dfe..2fa7561903cb21d2734eb0b3ef3b5e175002c3d0 100644 (file)
@@ -190,6 +190,8 @@ def fetch_peers(domain: str, software: str, origin: str) -> list:
         elif "json" in data and len(data["json"]) > 0:
             logger.debug("Querying API path='%s' was successful: domain='%s',data[json][%s]()=%d", path, domain, type(data['json']), len(data['json']))
             peers = data["json"]
+
+            logger.debug("Marking domain='%s' as successfully handled ...")
             instances.set_success(domain)
             break
 
@@ -304,6 +306,8 @@ def fetch_wellknown_nodeinfo(domain: str) -> dict:
 
     if "error_message" not in data:
         nodeinfo = data["json"]
+
+        logger.debug("Marking domain='%s' as successfully handled ...")
         instances.set_success(domain)
 
         logger.debug("Found entries: nodeinfo()=%d,domain='%s'", len(nodeinfo), domain)
@@ -339,6 +343,8 @@ def fetch_wellknown_nodeinfo(domain: str) -> dict:
                         logger.debug("Found JSON data()=%d", len(data))
                         instances.set_detection_mode(domain, "AUTO_DISCOVERY")
                         instances.set_nodeinfo_url(domain, link["href"])
+
+                        logger.debug("Marking domain='%s' as successfully handled ...")
                         instances.set_success(domain)
                         break
                     else:
index 288280b5e69fc287eb0d991e04d0050c48e4b06d..c866481b8406f291558e169da56706e239f71333 100644 (file)
@@ -67,6 +67,8 @@ def fetch_peers(domain: str, origin: str) -> list:
         elif "federated_instances" in data["json"] and isinstance(data["json"]["federated_instances"], dict):
             logger.debug("Found federated_instances for domain='%s'", domain)
             peers = peers + federation.add_peers(data["json"]["federated_instances"])
+
+            logger.debug("Marking domain='%s' as successfully handled ...")
             instances.set_success(domain)
         else:
             logger.warning("JSON response does not contain 'federated_instances', domain='%s' - trying /instances ...", domain)
@@ -235,6 +237,9 @@ def fetch_instances(domain: str, origin: str) -> list:
                     logger.debug("Appending peer='%s' ...", peer)
                     peers.append(peer)
 
+        logger.debug("Marking domain='%s' as successfully handled ...")
+        instances.set_success(domain)
+
     except network.exceptions as exception:
         logger.warning("domain='%s',exception[%s]:'%s'", domain, type(exception), str(exception))
         instances.set_last_error(domain, exception)
index 9ed961b9c31cf14507c1d712d5ea8d67b325bfb2..7402ee5d3b264328f3276bbdc4dc6b5291e3e889 100644 (file)
@@ -171,6 +171,8 @@ def fetch_blocks(domain: str, nodeinfo_url: str) -> list:
         else:
             # Getting blocklist
             rows = data["json"]
+
+            logger.debug("Marking domain='%s' as successfully handled ...")
             instances.set_success(domain)
 
         if len(rows) == 0:
index d7909b564b2322c618a0e2295411bd0413f7775c..c62de4b5d9e72c119b1b8c476ef19b66f1baa9c7 100644 (file)
@@ -195,7 +195,7 @@ def is_domain_wanted(domain: str) -> bool:
         logger.debug("domain='%s' is blacklisted - settings False ...", domain)
         wanted = False
     elif domain.find("/profile/") > 0 or domain.find("/users/") > 0 or (instances.is_registered(domain.split("/")[0]) and domain.find("/c/") > 0):
-        loger.debug("domain='%s' is a single user", domain)
+        logger.debug("domain='%s' is a single user", domain)
         wanted = False
     elif domain.find("/tag/") > 0:
         logger.debug("domain='%s' is a tag", domain)