fix: restore Python 3.12 startup and release 2.0.1
This commit is contained in:
1 parent
bf6247703d
commit
b584dae80a
19 files changed
+223
-20
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user