fix: #5570, create per category user post zsets

This commit is contained in:
Barış Soner Uşaklı
2019-06-24 15:21:43 -04:00
parent 4e513cf38a
commit a39f0ef592
15 changed files with 316 additions and 89 deletions

View File

@@ -111,6 +111,8 @@ module.exports = function (Posts) {
const tasks = [
async.apply(db.decrObjectField, 'global', 'postCount'),
async.apply(db.decrObjectField, 'category:' + topicData.cid, 'post_count'),
async.apply(db.sortedSetRemove, 'cid:' + topicData.cid + ':uid:' + postData.uid + ':pids', postData.pid),
async.apply(db.sortedSetRemove, 'cid:' + topicData.cid + ':uid:' + postData.uid + ':pids:votes', postData.pid),
async.apply(topics.decreasePostCount, postData.tid),
async.apply(topics.updateTeaser, postData.tid),
async.apply(topics.updateLastPostTimeFromLastPid, postData.tid),