From 7705ec9c6f704f8e9f7fc20f6d8ff35bf4064ac9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 21 Nov 2023 05:16:45 +0100 Subject: [PATCH] Continued: - also need to reduce depth here --- fba/http/federation.py | 2 ++ fba/http/nodeinfo.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fba/http/federation.py b/fba/http/federation.py index 1aa79b1..0fd5720 100644 --- a/fba/http/federation.py +++ b/fba/http/federation.py @@ -87,6 +87,7 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path: logger.debug("software='%s'", software) if software_helper.is_relay(software): logger.debug("software='%s' is a relay software - EXIT!", software) + _DEPTH = _DEPTH - 1 return logger.debug("Updating last_instance_fetch for domain='%s' ...", domain) @@ -122,6 +123,7 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path: return elif len(peerlist) == 0: logger.debug("domain='%s',software='%s' has an empty peer list returned - EXIT!", domain, software) + _DEPTH = _DEPTH - 1 return logger.info("Checking %d instance(s) from domain='%s',software='%s',depth=%d ...", len(peerlist), domain, software, _DEPTH) diff --git a/fba/http/nodeinfo.py b/fba/http/nodeinfo.py index 341a15f..5810c56 100644 --- a/fba/http/nodeinfo.py +++ b/fba/http/nodeinfo.py @@ -25,8 +25,6 @@ from fba.http import network from fba.models import instances -_DEPTH = 0 - logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) -- 2.39.5