You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
@@ -33,11 +33,17 @@ RedisClient.prototype.select = RedisClient.prototype.SELECT = function select (d
|
||||
};
|
||||
|
||||
// Store info in this.server_info after each call
|
||||
RedisClient.prototype.info = RedisClient.prototype.INFO = function info (callback) {
|
||||
RedisClient.prototype.info = RedisClient.prototype.INFO = function info (section, callback) {
|
||||
var self = this;
|
||||
var ready = this.ready;
|
||||
if (typeof section === 'function') {
|
||||
callback = section;
|
||||
section = 'default';
|
||||
} else if (section === undefined) {
|
||||
section = 'default';
|
||||
}
|
||||
this.ready = ready || this.offline_queue.length === 0; // keep the execution order intakt
|
||||
var tmp = this.send_command('info', [], function (err, res) {
|
||||
var tmp = this.send_command('info', [section], function (err, res) {
|
||||
if (res) {
|
||||
var obj = {};
|
||||
var lines = res.toString().split('\r\n');
|
||||
|
Reference in New Issue
Block a user