change where progress.incr is called for flags_refactor upgrade script

This commit is contained in:
Julian Lam
2017-04-27 02:44:02 -04:00
parent 33e8ecc1f4
commit 6095b7e6db

View File

@@ -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);