Add scheduled refresh for tables that change at a fixed time of day

This commit is contained in:
2026-07-30 11:28:20 +02:00
parent 4a86b2282f
commit 0026a4df22
12 changed files with 652 additions and 66 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ class TableState:
LOADING = "loading" # a full load is in progress
REFRESHING = "refreshing" # an incremental (delta) refresh is in progress
READY = "ready" # cached and idle
STALE = "stale" # TTL expired — will reload on next access
STALE = "stale" # TTL expired / schedule slot passed — reloads on next access
ERROR = "error" # the last load failed
@@ -25,7 +25,7 @@ class TableStats:
# the first cycle runs after start. Answers "is the refresh loop alive?".
last_refresh: str | None = None
state: str = TableState.READY
tracking: str = "static" # "delta" | "ttl" | "static"
tracking: str = "static" # "delta" | "ttl" | "schedule" | "static"
# Most recent load/refresh failure for this table, if any. ``consecutive_failures``
# resets to 0 on the next success, so > 0 means the table is currently failing.
last_error: str | None = None