fix: restore Python 3.12 startup and release 2.0.1

This commit is contained in:
chenmingxuan committed 2026-10-22 19:22:13 +08:00
1 parent bf6247703d
commit b584dae80a
19 files changed
+223 -20

No files matched your search

+4 -4
View File
@@ -145,16 +145,16 @@ class ReadinessEngine:
device check.
"""
cacheable = categories is None
request_started = time.monotonic()
cache_at_request = self._report_cache
if cacheable and not force_refresh:
cached = self._cached_report(self._REPORT_CACHE_TTL_SECONDS)
if cached is not None:
return cached
async with self._report_lock:
# A refresh that completed while this caller waited satisfies even a
# forced request that began before it, coalescing concurrent clicks.
if cacheable and self._report_cache_time >= request_started:
# A replacement report completed while this caller waited. Compare
# the snapshot itself: sequential requests can share a clock tick.
if cacheable and self._report_cache is not cache_at_request:
cached = self._cached_report(float("inf"))
if cached is not None:
return cached