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