mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-05 17:40:42 +08:00
Merge branch 'nsc/amazon'
This commit is contained in:
commit
311f812a96
@ -1,7 +1,6 @@
|
|||||||
import { Request, Response } from "express";
|
import { Request, Response } from "express";
|
||||||
import Redis from "ioredis";
|
import Redis from "ioredis";
|
||||||
import { Logger } from "../../lib/logger";
|
import { Logger } from "../../lib/logger";
|
||||||
import { sendSlackWebhook } from "../../services/alerts/slack";
|
|
||||||
import { redisRateLimitClient } from "../../services/rate-limiter";
|
import { redisRateLimitClient } from "../../services/rate-limiter";
|
||||||
|
|
||||||
export async function redisHealthController(req: Request, res: Response) {
|
export async function redisHealthController(req: Request, res: Response) {
|
||||||
@ -63,22 +62,22 @@ export async function redisHealthController(req: Request, res: Response) {
|
|||||||
Logger.info(
|
Logger.info(
|
||||||
`Redis instances health check: ${JSON.stringify(healthStatus)}`
|
`Redis instances health check: ${JSON.stringify(healthStatus)}`
|
||||||
);
|
);
|
||||||
await sendSlackWebhook(
|
// await sendSlackWebhook(
|
||||||
`[REDIS DOWN] Redis instances health check: ${JSON.stringify(
|
// `[REDIS DOWN] Redis instances health check: ${JSON.stringify(
|
||||||
healthStatus
|
// healthStatus
|
||||||
)}`,
|
// )}`,
|
||||||
true
|
// true
|
||||||
);
|
// );
|
||||||
return res
|
return res
|
||||||
.status(500)
|
.status(500)
|
||||||
.json({ status: "unhealthy", details: healthStatus });
|
.json({ status: "unhealthy", details: healthStatus });
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Logger.error(`Redis health check failed: ${error}`);
|
Logger.error(`Redis health check failed: ${error}`);
|
||||||
await sendSlackWebhook(
|
// await sendSlackWebhook(
|
||||||
`[REDIS DOWN] Redis instances health check: ${error.message}`,
|
// `[REDIS DOWN] Redis instances health check: ${error.message}`,
|
||||||
true
|
// true
|
||||||
);
|
// );
|
||||||
return res
|
return res
|
||||||
.status(500)
|
.status(500)
|
||||||
.json({ status: "unhealthy", message: error.message });
|
.json({ status: "unhealthy", message: error.message });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user