From b06adeab4624fe95074ece3480f5de604e160353 Mon Sep 17 00:00:00 2001 From: Shadowbroker <43977454+BigBodyCobain@users.noreply.github.com> Date: Sun, 23 Aug 2026 01:46:26 -0600 Subject: [PATCH] fix(xquik): make attempt timestamp sentinel explicit --- backend/services/fetchers/xquik_news.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/services/fetchers/xquik_news.py b/backend/services/fetchers/xquik_news.py index a59f73a..65b7df8 100644 --- a/backend/services/fetchers/xquik_news.py +++ b/backend/services/fetchers/xquik_news.py @@ -28,7 +28,7 @@ _cache_lock = threading.Lock() _cache_signature: tuple[str, int] | None = None _cache_entries: list[dict[str, Any]] = [] _attempt_signature: tuple[str, int, str] | None = None -_last_attempt_at = 0.0 +_last_attempt_at: float | None = None def xquik_fetch_enabled() -> bool: @@ -159,7 +159,7 @@ def fetch_xquik_entries() -> list[dict[str, Any]]: now = time.monotonic() if ( _attempt_signature == attempt_signature - and _last_attempt_at + and _last_attempt_at is not None and now - _last_attempt_at < interval_seconds ): if _cache_signature == cache_signature: @@ -188,4 +188,4 @@ def _reset_cache_for_tests() -> None: _cache_signature = None _cache_entries = [] _attempt_signature = None - _last_attempt_at = 0.0 + _last_attempt_at = None