fix(live-state): cap recent_rows query at 50 to bound row count

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mwiegand 2026-05-17 21:05:13 +02:00
parent 309354942a
commit 9554661e5a
No known key found for this signature in database

View file

@ -260,6 +260,7 @@ def live_state_fragment(server_id: int) -> Response:
ServerPlayerSession.name_at_join,
)
.order_by(func.max(ServerPlayerSession.left_at).desc())
.limit(50)
).all()
recent_total = len(recent_rows)