[Server] Record uptime through the database interface (#7856)

This commit is contained in:
BruebachL 2026-11-10 12:16:33 +01:00 • committed by GitHub
parent f1ee6bdc2d
commit 09d0bed997
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 49 additions and 13 deletions

View file

@ -733,6 +733,23 @@ public:
return {};
}
/** @brief One row the periodic status update appends to the uptime table. */
struct UptimeRecord
{
int serverId = 0;
int uptimeSecs = 0;
int usersCount = 0;
int modsCount = 0;
QString modsList;
int gamesCount = 0;
quint64 txBytes = 0;
quint64 rxBytes = 0;
};
/** @brief Appends one uptime row; a no-op when persistence is unavailable. */
virtual void recordUptime(const UptimeRecord & /* record */)
{
}
virtual void clearSessionTables()
{
}