mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
fix: tweak upgrade script again
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const db = require('../../database');
|
const db = require('../../database');
|
||||||
const activitypub = require('../../activitypub');
|
const activitypub = require('../../activitypub');
|
||||||
|
|
||||||
@@ -15,6 +14,9 @@ module.exports = {
|
|||||||
const interval = 5000;
|
const interval = 5000;
|
||||||
|
|
||||||
await batch.processSortedSet('usersRemote:lastCrawled', async (ids) => {
|
await batch.processSortedSet('usersRemote:lastCrawled', async (ids) => {
|
||||||
|
const exists = await Promise.all(ids.map(async id => await db.isObjectField(`userRemote:${id}`, 'url')));
|
||||||
|
ids = ids.filter((id, idx) => exists[idx]);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await activitypub.actors.assert(ids, { update: true });
|
await activitypub.actors.assert(ids, { update: true });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user