diff --git a/lib/connection.js b/lib/connection.js index 9cb3b4c..6e31afc 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -65,7 +65,7 @@ Connection.prototype.connectMethod = function (config, callback) { } Connection.prototype.connectReplicaMethod = function (config, callback) { - this.connectRedis(config.redisReplicaUrl, callback) + this.connectRedis(config.redisReplicaUrl, callback, true) } Connection.prototype.establish = function (ready) { @@ -145,7 +145,7 @@ Connection.prototype.teardown = function (callback) { } } -Connection.prototype.connectRedis = function (config, callback) { +Connection.prototype.connectRedis = function (config, callback, isReplica = false) { let client = new Redis({ port: config.port, host: config.host, @@ -168,7 +168,11 @@ Connection.prototype.connectRedis = function (config, callback) { } client.on('ready', function () { - logging.info('Redis client "ready" event.') + if (isReplica) { + logging.info('Redis Replica client "ready" event.') + } else { + logging.info('Redis client "ready" event.') + } callback(null, client) })