mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
added progress bar to username_email_history upgrade script
This commit is contained in:
@@ -10,6 +10,8 @@ module.exports = {
|
||||
name: 'Record first entry in username/email history',
|
||||
timestamp: Date.UTC(2018, 7, 28),
|
||||
method: function (callback) {
|
||||
const progress = this.progress;
|
||||
|
||||
batch.processSortedSet('users:joindate', function (ids, next) {
|
||||
async.each(ids, function (uid, next) {
|
||||
async.parallel([
|
||||
@@ -55,8 +57,13 @@ module.exports = {
|
||||
},
|
||||
], next);
|
||||
},
|
||||
], next);
|
||||
], function (err) {
|
||||
progress.incr();
|
||||
setImmediate(next, err);
|
||||
});
|
||||
}, next);
|
||||
}, {
|
||||
progress: this.progress,
|
||||
}, callback);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user