feat: implement comprehensive health check endpoints for API, Auth, and Realtime services to monitor database, Redis, MinIO, and InfluxDB connectivity.
This commit is contained in:
@@ -32,5 +32,17 @@ async function configure() {
|
||||
function connected() {
|
||||
return redis.status === 'ready';
|
||||
}
|
||||
|
||||
async function checkRedis() {
|
||||
try {
|
||||
if (redis.status !== 'ready') {
|
||||
await redis.connect().catch(() => {});
|
||||
}
|
||||
await redis.ping();
|
||||
return true;
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { redis, configure, connected };
|
||||
module.exports = { redis, configure, connected, checkRedis };
|
||||
Reference in New Issue
Block a user