fix: Broken voice states and connectivity drops
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
import { Router } from 'express';
|
||||
import { randomUUID } from 'crypto';
|
||||
import { getAllPublicServers } from '../cqrs';
|
||||
import { getReleaseManifestUrl } from '../config/variables';
|
||||
import { SERVER_BUILD_VERSION } from '../generated/build-version';
|
||||
import { connectedUsers } from '../websocket/state';
|
||||
|
||||
const router = Router();
|
||||
const SERVER_INSTANCE_ID = typeof process.env.METOYOU_SERVER_INSTANCE_ID === 'string'
|
||||
&& process.env.METOYOU_SERVER_INSTANCE_ID.trim().length > 0
|
||||
? process.env.METOYOU_SERVER_INSTANCE_ID.trim()
|
||||
: randomUUID();
|
||||
|
||||
function getServerProjectVersion(): string {
|
||||
return typeof process.env.METOYOU_SERVER_VERSION === 'string' && process.env.METOYOU_SERVER_VERSION.trim().length > 0
|
||||
@@ -20,6 +25,7 @@ router.get('/health', async (_req, res) => {
|
||||
timestamp: Date.now(),
|
||||
serverCount: servers.length,
|
||||
connectedUsers: connectedUsers.size,
|
||||
serverInstanceId: SERVER_INSTANCE_ID,
|
||||
serverVersion: getServerProjectVersion(),
|
||||
releaseManifestUrl: getReleaseManifestUrl()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user