mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 03:28:49 -05:00
d9d65ac31c
upgrade logger in libraries GitOrigin-RevId: 5968f5abc5f77061cd90b5ebbccf86349619c4a7
17 lines
488 B
JavaScript
17 lines
488 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('@overleaf/logger')
|
|
|
|
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)
|