1
0
mirror of https://github.com/craigerl/aprsd.git synced 2025-07-23 19:00:08 -04:00

Some cleanup with list plugins

This commit is contained in:
Hemna 2025-01-06 17:14:55 -05:00
parent df14eb8f28
commit 5274c5dc56
2 changed files with 14 additions and 14 deletions

View File

@ -91,9 +91,7 @@ def _get_installed_aprsd_items():
plugins = {}
extensions = {}
for finder, name, ispkg in pkgutil.iter_modules():
if name.startswith("aprsd_"):
print(f"Found aprsd_ module: {name}")
if ispkg:
if ispkg and name.startswith("aprsd_"):
module = importlib.import_module(name)
pkgs = walk_package(module)
for pkg in pkgs:

View File

@ -113,6 +113,7 @@ class ListenStatsThread(APRSDThread):
stats_json = collector.Collector().collect()
stats = stats_json["PacketList"]
total_rx = stats["rx"]
packet_count = len(stats["packets"])
rx_delta = total_rx - self._last_total_rx
rate = rx_delta / 10
@ -120,7 +121,8 @@ class ListenStatsThread(APRSDThread):
LOGU.opt(colors=True).info(
f"<green>RX Rate: {rate} pps</green> "
f"<yellow>Total RX: {total_rx}</yellow> "
f"<red>RX Last 10 secs: {rx_delta}</red>",
f"<red>RX Last 10 secs: {rx_delta}</red> "
f"<white>Packets in PacketList: {packet_count}</white>",
)
self._last_total_rx = total_rx