Skip to content

Node.js based forum software built for the modern web

change where progress.incr is called for flags_refactor upgrade script

Julian Lam6095b7e6dbef
diff --git a/src/upgrades/1.5.0/flags_refactor.js b/src/upgrades/1.5.0/flags_refactor.js
index 08fc1831d8..a175cd2854 100644
--- a/src/upgrades/1.5.0/flags_refactor.js
+++ b/src/upgrades/1.5.0/flags_refactor.js
@@ -26,6 +26,8 @@ module.exports = {
});
async.each(posts, function (post, next) {
+ progress.incr();
+
async.parallel({
uids: async.apply(db.getSortedSetRangeWithScores, 'pid:' + post.pid + ':flag:uids', 0, -1),
reasons: async.apply(db.getSortedSetRange, 'pid:' + post.pid + ':flag:uid:reason', 0, -1),
@@ -81,8 +83,6 @@ module.exports = {
} else {
next(err);
}
-
- progress.incr();
});
});
}, next);