mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-01 13:02:07 -05:00
a540754f6e
[misc] bulk replace localhost with 127.0.0.1 GitOrigin-RevId: d238f3635302e8ff5500d611108c4d1bef216726
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: '127.0.0.1', port: '6379' })
|
|
|
|
setInterval(() => {
|
|
rclient.healthCheck(err => {
|
|
if (err) {
|
|
logger.error({ err }, 'HEALTH CHECK FAILED')
|
|
} else {
|
|
logger.info('HEALTH CHECK OK')
|
|
}
|
|
})
|
|
}, 1000)
|