node-redis icon indicating copy to clipboard operation
node-redis copied to clipboard

Invoke GET method with promisify but return redis server info.

Open jeckzang opened this issue 4 years ago • 1 comments

Issue

I use promisify to create a getAsync function, and I use this function to get data from redis, some code like below: const getAsync = util.promisify(redisClient.GET).bind(redisClient); let userDataUuid = await getAsync(buildUserNameCacheKey(TID, userName)); but in my log this "userDataUuid" is below, it sames redis server info.

Server^M

redis_version:5.0.5^M redis_git_sha1:00000000^M redis_git_dirty:0^M redis_build_id:442b43d467cd2b03^M

and here is my retry_strategy, I need retry evertytime, I think maybe retry logic made that server info response. retry_strategy: function(options) { logger.info("Test Redis connection!"); // reconnect after return Math.min(options.attempt * 100, 30000); }


Environment

  • node-redis Version: 2.8.0

  • Node.js Version: docker image node:10-alpine

  • Redis Version: 5.0.5

  • Platform: Linux

jeckzang avatar May 25 '20 08:05 jeckzang