wipe existing rss tokens

v1.18.x
psychobunny 8 years ago
parent b807d3750c
commit 6cb0d6f8c1

@ -0,0 +1,22 @@
'use strict';
var async = require('async');
var batch = require('../../batch');
var db = require('../../database');
module.exports = {
name: 'Wipe all existing RSS tokens',
timestamp: Date.UTC(2017, 6, 5),
method: function (callback) {
var progress = this.progress;
batch.processSortedSet('users:joindate', function (uids, next) {
async.eachSeries(uids, function (uid, next) {
progress.incr();
db.deleteObjectField('user:' + uid, 'rss_token', next);
}, next);
}, {
progress: progress,
}, callback);
},
};
Loading…
Cancel
Save