added progress bar to username_email_history upgrade script

This commit is contained in:
Julian Lam
2018-08-30 17:03:42 -04:00
parent 545e678e8a
commit c1725442ea

View File

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