Handle redis error and re-establish connection

master
John Crepezzi 7 years ago
parent ad7702aaf4
commit bf2b1c957a
  1. 5
      lib/document_stores/redis.js

@ -29,6 +29,11 @@ RedisDocumentStore.connect = function(options) {
if (options.password) {
RedisDocumentStore.client.auth(options.password);
}
RedisDocumentStore.client.on('error', function(err) {
winston.error('redis disconnected', err);
});
RedisDocumentStore.client.select(index, function(err) {
if (err) {
winston.error(

Loading…
Cancel
Save