refactor: remove promisify from redis, ioredis supports promises nati… (#9728)

* refactor: remove promisify from redis, ioredis supports promises natively

* refactor: remove unused util
This commit is contained in:
Barış Soner Uşaklı
2021-08-21 23:31:31 -04:00
committed by GitHub
parent d44e3a8ecf
commit 6659e95a4a
9 changed files with 53 additions and 126 deletions

View File

@@ -14,7 +14,7 @@ module.exports = function (module) {
if (!utils.isNumber(score)) {
throw new Error(`[[error:invalid-score, ${score}]]`);
}
await module.client.async.zadd(key, score, String(value));
await module.client.zadd(key, score, String(value));
};
async function sortedSetAddMulti(key, scores, values) {
@@ -34,7 +34,7 @@ module.exports = function (module) {
for (let i = 0; i < scores.length; i += 1) {
args.push(scores[i], String(values[i]));
}
await module.client.async.zadd(args);
await module.client.zadd(args);
}
module.sortedSetsAdd = async function (keys, scores, value) {

View File

@@ -21,7 +21,7 @@ module.exports = function (module) {
key.forEach(k => batch.zrem(k, value));
await helpers.execBatch(batch);
} else {
await module.client.async.zrem(key, value);
await module.client.zrem(key, value);
}
};