From dfd1c401f3d20410dddf4de5da2a82fb47e041e2 Mon Sep 17 00:00:00 2001 From: Max Drexler <mndrexler@wisc.edu> Date: Thu, 25 Jul 2024 17:40:48 +0000 Subject: [PATCH] fix bug with cache cleaning time --- grib_processor/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/grib_processor/utils.py b/grib_processor/utils.py index 07eaf3e..4ca30d3 100644 --- a/grib_processor/utils.py +++ b/grib_processor/utils.py @@ -189,6 +189,7 @@ def realtime(file_iter: Iterable[str]) -> Generator[GribPayload, None, None]: if time.time() - last_clean_time > CACHE_CLEAN_INTERVAL: LOG.info("realtime - time to clean the cache") _clean_caches(cache) + last_clean_time = time.time() def grib_filter(change: Change, path: str) -> bool: -- GitLab