|
|
|
@ -72,6 +72,11 @@ var winston = require('winston'),
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ThreadTools.purge = function(tid, uid, callback) {
|
|
|
|
|
ThreadTools.exists(tid, function(err, exists) {
|
|
|
|
|
if (err || !exists) {
|
|
|
|
|
return callback(err);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
batch.processSortedSet('tid:' + tid + ':posts', function(pids, next) {
|
|
|
|
|
async.eachLimit(pids, 10, posts.purge, next);
|
|
|
|
|
}, {alwaysStartAt: 0}, function(err) {
|
|
|
|
@ -91,6 +96,7 @@ var winston = require('winston'),
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ThreadTools.lock = function(tid, uid, callback) {
|
|
|
|
|