mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-12 04:50:01 -08:00
[Server] Record uptime through the database interface
This commit is contained in:
parent
23b4a727ec
commit
004f1eaf0d
4 changed files with 49 additions and 13 deletions
|
|
@ -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()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue