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

@@ -1,13 +1,7 @@
import {
AdminMessage,
ConnectedAircraft,
getPublicUser,
MissionLog,
Prisma,
prisma,
} from "@repo/db";
import { AdminMessage, getPublicUser, MissionLog, Prisma, prisma } from "@repo/db";
import { Router } from "express";
import { io } from "../index";
import { aircraftPatches } from "modules/prometheus";
const router: Router = Router();
@@ -97,7 +91,7 @@ router.patch("/:id", async (req, res) => {
},
});
}
aircraftPatches.inc();
res.json(updatedConnectedAircraft);
// When change is only the estimated logout time, we don't need to emit an event
if (Object.keys(aircraftUpdate).length === 1 && aircraftUpdate.esimatedLogoutTime) return;