mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
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:
committed by
GitHub
parent
d44e3a8ecf
commit
6659e95a4a
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user