mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: non-functional upgrade script
This commit is contained in:
@@ -10,11 +10,11 @@ module.exports = {
|
||||
method: async function () {
|
||||
const { progress } = this;
|
||||
|
||||
await batch.processSortedSet('posts:pid', async (postData) => {
|
||||
const keys = postData.map(p => `post:${p.pid}:uploads`);
|
||||
await batch.processSortedSet('posts:pid', async (pids) => {
|
||||
const keys = pids.map(p => `post:${p}:uploads`);
|
||||
const uploads = await db.getSortedSetRange(keys, 0, -1);
|
||||
await posts.uploads.saveSize(uploads);
|
||||
progress.incr(postData.length);
|
||||
progress.incr(pids.length);
|
||||
}, {
|
||||
batch: 100,
|
||||
progress: progress,
|
||||
|
||||
Reference in New Issue
Block a user