@@ -2818,6 +2818,7 @@ exports.INSERT_NOTIFICATIONS_MUTATION = ` mutation INSERT_NOTIFICATIONS($object
|
||||
}
|
||||
}`;
|
||||
|
||||
// REMEMBER: Update the cache_bodyshop event in hasura to include any added fields
|
||||
exports.GET_BODYSHOP_BY_ID = `
|
||||
query GET_BODYSHOP_BY_ID($id: uuid!) {
|
||||
bodyshops_by_pk(id: $id) {
|
||||
|
||||
@@ -142,4 +142,17 @@ router.post("/alertcheck", eventAuthorizationMiddleware, alertCheck);
|
||||
// Redis Cache Routes
|
||||
router.post("/bodyshop-cache", eventAuthorizationMiddleware, updateBodyshopCache);
|
||||
|
||||
// Health Check for docker-compose-cluster load balancer, only available in development
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
router.get("/health", (req, res) => {
|
||||
const healthStatus = {
|
||||
status: "healthy",
|
||||
timestamp: new Date().toISOString(),
|
||||
environment: process.env.NODE_ENV || "unknown",
|
||||
uptime: process.uptime()
|
||||
};
|
||||
res.status(200).json(healthStatus);
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = router;
|
||||
|
||||
Reference in New Issue
Block a user