overleaf/libraries/redis-wrapper/test/scripts/standalone.js
2020-11-09 16:57:08 +00:00

13 lines
No EOL
414 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
redis = require "../.."
rclient = redis.createClient({host:"localhost",port:"6379"})
setInterval () ->
rclient.healthCheck (err) ->
if err?
console.log "HEALTH CHECK FAILED", err
else
console.log "HEALTH CHECK OK"
, 1000