mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: redis processing batch+1 items every iteration
This commit is contained in:
@@ -33,7 +33,7 @@ exports.processSortedSet = async function (setKey, process, options) {
|
||||
options.doneIf = typeof options.doneIf === 'function' ? options.doneIf : function () {};
|
||||
|
||||
let start = 0;
|
||||
let stop = options.batch;
|
||||
let stop = options.batch - 1;
|
||||
|
||||
if (process && process.constructor && process.constructor.name !== 'AsyncFunction') {
|
||||
process = util.promisify(process);
|
||||
|
||||
Reference in New Issue
Block a user