mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-06 23:00:08 +01:00
Work around MongoDB bug (see https://github.com/NodeBB/NodeBB/pull/5050#issuecomment-256766439)
This commit is contained in:
@@ -923,10 +923,11 @@ Upgrade.upgrade = function (callback) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
async.each(data, function (postData, next) {
|
||||
async.eachSeries(data, function (postData, next) {
|
||||
if (!parseInt(postData.toPid, 10)) {
|
||||
return next(null);
|
||||
}
|
||||
console.log('processing pid: ' + postData.pid + ' toPid: ' + postData.toPid);
|
||||
async.parallel([
|
||||
async.apply(db.sortedSetAdd, 'pid:' + postData.toPid + ':replies', postData.timestamp, postData.pid),
|
||||
async.apply(db.incrObjectField, 'post:' + postData.toPid, 'replies')
|
||||
|
||||
Reference in New Issue
Block a user