This commit is contained in:
Christopher Cookman 2026-01-25 15:19:22 -07:00
parent 0ce24300d7
commit 606ff96fd2

View file

@ -11,8 +11,8 @@ router.post('/', global.auth, async (req, res) => {
console.log(`Recording startup: ${serverId} at ${serverStartTime} for place ${placeId} rev ${revision}`);
const firstHeartbeat = Date.now() + ((parseInt(process.env.MAX_HEARTBEAT, 10) || 60) * 1000);
db.run(
'INSERT INTO analytics (id, placeId, revision, startupTime, heartbeatCheck) VALUES (?, ?, ?, ?, ?)',
[serverId, placeId, revision, serverStartTime, firstHeartbeat / 1000],
'INSERT INTO analytics (id, placeId, revision, startupTime, heartbeatCheck, allPlayers) VALUES (?, ?, ?, ?, ?, ?)',
[serverId, placeId, revision, serverStartTime, firstHeartbeat / 1000, JSON.stringify({})],
function(err) {
if (err) {
console.error('Failed to record startup data', err);