-
Notifications
You must be signed in to change notification settings - Fork 17
Description
I'm trying to use hmset:
redisConnection.hmset(personId, {
tagId: req.params.tagId,
personHash: req.params.personHash
}, function(err, reply) {
if (err) {
throw err;
}
assert(reply, 'OK');
});
And got error:
/app/node_modules/redis-cluster/node_modules/redis/index.js:563
throw callback_err;
^
TypeError: Object Error: ERR wrong number of arguments for 'hmset' command has no method 'substr'
at Command.callback (/srv/http/pagetag-js-test/node_modules/redis-cluster/index.js:181:18)
at RedisClient.return_error (/srv/http/pagetag-js-test/node_modules/redis-cluster/node_modules/redis/index.js:559:25)
at ReplyParser. (/srv/http/pagetag-js-test/node_modules/redis-cluster/node_modules/redis/index.js:308:18)
at ReplyParser.emit (events.js:95:17)
at ReplyParser.send_error (/srv/http/pagetag-js-test/node_modules/redis-cluster/node_modules/redis/lib/parser/javascript.js:296:10)
at ReplyParser.execute (/srv/http/pagetag-js-test/node_modules/redis-cluster/node_modules/redis/lib/parser/javascript.js:181:22)
at RedisClient.on_data (/srv/http/pagetag-js-test/node_modules/redis-cluster/node_modules/redis/index.js:535:27)
at Socket. (/srv/http/pagetag-js-test/node_modules/redis-cluster/node_modules/redis/index.js:91:14)
at Socket.emit (events.js:95:17)
at Socket. (_stream_readable.js:765:14)
So what is correct way to use hmset function?