mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 09:53:39 -05:00
f0a3eeeb32
Remove logger.log in favour of logger.info GitOrigin-RevId: e305ae8adf19ecf144cee123b6837f35d5d45bed
17 lines
487 B
JavaScript
17 lines
487 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.info('HEALTH CHECK OK')
|
|
}
|
|
})
|
|
}, 1000)
|