You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
Refactor command parsing
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
var utils = require('./utils');
|
||||
var debug = require('./debug');
|
||||
var RedisClient = require('../').RedisClient;
|
||||
var Command = require('./command');
|
||||
var noop = function () {};
|
||||
|
||||
/**********************************************
|
||||
@@ -36,7 +37,7 @@ RedisClient.prototype.send_command = RedisClient.prototype.sendCommand = functio
|
||||
// but this might change from time to time and at the moment there's no good way to distinguishe them
|
||||
// from each other, so let's just do it do it this way for the time being
|
||||
if (command === 'multi' || typeof this[command] !== 'function') {
|
||||
return this.internal_send_command(command, args, callback);
|
||||
return this.internal_send_command(new Command(command, args, callback));
|
||||
}
|
||||
if (typeof callback === 'function') {
|
||||
args = args.concat([callback]); // Prevent manipulating the input array
|
||||
|
Reference in New Issue
Block a user