The RedisCheck pings the redis server to ensure we are able to connect to it.
const check = new RedisCheck(redis.connection())const result = await check.run()if (result.isHealthy) { console.log('Redis is healthy')} Copy
const check = new RedisCheck(redis.connection())const result = await check.run()if (result.isHealthy) { console.log('Redis is healthy')}
Create a new RedisCheck instance
The Redis connection to monitor
const check = new RedisCheck(redis.connection('main')) Copy
const check = new RedisCheck(redis.connection('main'))
Health check public name
Executes the health check
const result = await check.run()console.log(result.status) // 'ok' or 'error' Copy
const result = await check.run()console.log(result.status) // 'ok' or 'error'
The RedisCheck pings the redis server to ensure we are able to connect to it.
Example