Add scheduled refresh for tables that change at a fixed time of day
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user