fix: numThumb upgrade script

v1.18.x
Barış Soner Uşaklı 4 years ago
parent fee782c436
commit d9e2190a6b

@ -13,7 +13,7 @@ module.exports = {
await batch.processSortedSet('topics:tid', async (tids) => {
const keys = tids.map(tid => `topic:${tid}:thumbs`);
const counts = await db.sortedSetsCard(keys);
const tidToCount = _.zip(tids, counts);
const tidToCount = _.zipObject(tids, counts);
const tidsWithThumbs = tids.filter((t, i) => counts[i] > 0);
await db.setObjectBulk(
tidsWithThumbs.map(tid => `topic:${tid}`),

Loading…
Cancel
Save