prometheus + load-testing

This commit is contained in:
PxlLoewe
2025-06-28 16:05:44 -07:00
parent 246ce0ce22
commit 453cf9a414
20 changed files with 8171 additions and 404 deletions

View File

@@ -16,6 +16,7 @@ export const handleConnectPilot =
debug: boolean;
}) => {
try {
console.log("Connecting pilot:", socket.id, "Station ID:", stationId, "Debug mode:", debug);
if (!stationId) return Error("Station ID is required");
const user: User = socket.data.user; // User ID aus dem JWT-Token
const userId = socket.data.user.id; // User ID aus dem JWT-Token
@@ -43,7 +44,7 @@ export const handleConnectPilot =
},
});
if (existingConnection) {
if (existingConnection && !debug) {
await io.to(`user:${user.id}`).emit("force-disconnect", "double-connection");
await prisma.connectedAircraft.updateMany({
where: {