mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
17 lines
489 B
JavaScript
17 lines
489 B
JavaScript
// execute this script with a redis container running to test the health check
|
|
// starting and stopping redis with this script running is a good test
|
|
|
|
const redis = require('../../')
|
|
const logger = require('logger-sharelatex')
|
|
|
|
const rclient = redis.createClient({ host: 'localhost', port: '6379' })
|
|
|
|
setInterval(() => {
|
|
rclient.healthCheck((err) => {
|
|
if (err) {
|
|
logger.error({ err }, 'HEALTH CHECK FAILED')
|
|
} else {
|
|
logger.log('HEALTH CHECK OK')
|
|
}
|
|
})
|
|
}, 1000)
|