From adb9560870ef8cef83beaf0bc539ca0905ffe133 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Wed, 27 Nov 2024 18:44:32 +0800 Subject: [PATCH] athenad: move last_scan outside the loop (#34099) move last_scan outside the loop --- system/athena/athenad.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/athena/athenad.py b/system/athena/athenad.py index 4c056461ac..909e99fa71 100755 --- a/system/athena/athenad.py +++ b/system/athena/athenad.py @@ -629,8 +629,9 @@ def log_handler(end_event: threading.Event) -> None: def stat_handler(end_event: threading.Event) -> None: STATS_DIR = Paths.stats_root() + last_scan = 0.0 + while not end_event.is_set(): - last_scan = 0. curr_scan = time.monotonic() try: if curr_scan - last_scan > 10: