Fix active and match timer drift between status polls
Persist occupancy transitions with telemetry and carry timer anchors through live updates. Cover delayed polling, lobby rejoining, and lifecycle boundaries with regression tests. Fixes #47
This commit is contained in:
@@ -89,9 +89,9 @@ CREATE TABLE IF NOT EXISTS servers (
|
||||
created_by TEXT, -- 'ui' | operator identifier
|
||||
destroyed_at TEXT, -- ISO ts when tombstoned (row usually deleted; kept as safety net)
|
||||
-- Occupancy + match timers. active_since / inactive_since are mutually
|
||||
-- exclusive: exactly one is non-null while a server is reachable. RCON
|
||||
-- outages do NOT clear either — timers survive transient unreachability
|
||||
-- and resume from the same anchor when the server comes back.
|
||||
-- exclusive. Accepted telemetry records transitions immediately; status
|
||||
-- polls provide the RCON fallback. Outages do NOT clear either — timers
|
||||
-- survive transient unreachability and resume from the same anchor.
|
||||
active_since TEXT, -- ISO ts of last 0 -> >0 player transition
|
||||
inactive_since TEXT, -- ISO ts of last >0 -> 0 player transition
|
||||
game_started_at TEXT, -- receipt time of the script's game_start
|
||||
|
||||
Reference in New Issue
Block a user