Skip to content

Node.js based forum software built for the modern web

fix: redis batch

Barış Soner Uşaklı0c4b875e10f3
diff --git a/src/batch.js b/src/batch.js
index 64c0ee5964..8442def721 100644
--- a/src/batch.js
+++ b/src/batch.js
@@ -47,8 +47,8 @@ exports.processSortedSet = async function (setKey, process, options) {
}
await process(ids);
- start += utils.isNumber(options.alwaysStartAt) ? options.alwaysStartAt : options.batch + 1;
- stop = start + options.batch;
+ start += utils.isNumber(options.alwaysStartAt) ? options.alwaysStartAt : options.batch;
+ stop = start + options.batch - 1;
if (options.interval) {
await sleep(options.interval);