redis-json
redis-json copied to clipboard
DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
Hi,
We are using ioredis 5.0.4 which already returns Promise for all the operations.. So if we use redis-json to get/set JSON from Redis, it prints the following message to the console:
(node:13167) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
I believe that's because you've wrapped the functions with promisify
.
hmset: promisify(redisClient.hmset).bind(redisClient),
hmget: promisify(redisClient.hmget).bind(redisClient),
hgetall: promisify(redisClient.hgetall).bind(redisClient),
expire: promisify(redisClient.expire).bind(redisClient),
del: promisify(redisClient.del).bind(redisClient),
scan: promisify(redisClient.scan).bind(redisClient),
hincrbyfloat: promisify(redisClient.hincrbyfloat).bind(redisClient),
Any chance you can remove that and upgrade to ioredis v5? Or patch it so that you don't call promisify
if ioredis ^5.0 ? Thanks!