odstranenie priemernej dlzky hry zo statistik

This commit is contained in:
tim committed 2026-10-26 21:32:33 +01:00
1 parent 3655e06587
commit 4000da0454
2 files changed
-14

No files matched your search

-9
View File
@@ -240,14 +240,6 @@ async def get_daily_stats(logged_in_only: bool = False) -> dict:
)
).one()
avg_duration = (
await session.execute(
select(func.avg(func.extract("epoch", Game.ended_at - Game.created_at))).where(
Game.ended_at.is_not(None)
)
)
).scalar()
# Nedokoncena registracia = kod nebol nikdy potvrdeny (SQL obdoba
# api/auth._is_unconfirmed). "Hraci celkom" pocita len potvrdene ucty,
# nedokoncene sa vykazuju osobitne.
@@ -338,7 +330,6 @@ async def get_daily_stats(logged_in_only: bool = False) -> dict:
"players_per_day": {str(r.day): r.n for r in player_rows},
"finished_bot_games": finished_bot_games,
"finished_human_games": finished_human_games,
"avg_game_duration_minutes": (float(avg_duration) / 60) if avg_duration else None,
"total_players": total_players,
"unconfirmed_players": unconfirmed_players,
"peak_hours": {int(r.h): r.n for r in peak_hours},