Skip to content

Node.js based forum software built for the modern web

fix: tweak upgrade script again

Julian Lamae146024af00
diff --git a/src/upgrades/4.0.0/remote_user_urls.js b/src/upgrades/4.0.0/remote_user_urls.js
index 15bde93276..4b59a351b6 100644
--- a/src/upgrades/4.0.0/remote_user_urls.js
+++ b/src/upgrades/4.0.0/remote_user_urls.js
@@ -8,10 +8,10 @@ const activitypub = require('../../activitypub');
module.exports = {
name: 'Re-assert all existing actors to save URL into hash',
timestamp: Date.UTC(2024, 3, 4),
- method: async () => {
+ method: async function () {
const batch = require('../../batch');
const { progress } = this;
- const interval = 5000;
+ const interval = 1500;
await batch.processSortedSet('usersRemote:lastCrawled', async (ids) => {
const exists = await Promise.all(ids.map(async id => await db.isObjectField(`userRemote:${id}`, 'url')));
@@ -22,6 +22,8 @@ module.exports = {
} catch (e) {
// noop
}
+
+ progress.incr(ids.length);
}, { progress, interval });
},
};