refactor: setObjectBulk to match sortedSetAddBulk

This commit is contained in:
Barış Soner Uşaklı
2021-11-12 19:51:59 -05:00
parent 1a85aaad23
commit 8379c11b22
13 changed files with 75 additions and 82 deletions

View File

@@ -343,8 +343,7 @@ module.exports = function (Posts) {
post.data.tid = newTid;
});
await db.setObjectBulk(
postData.map(p => `post:queue:${p.id}`),
postData.map(p => ({ data: JSON.stringify(p.data) }))
postData.map(p => [`post:queue:${p.id}`, { data: JSON.stringify(p.data) }]),
);
cache.del('post-queue');
}