prometheus + load-testing
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user