kopia lustrzana https://github.com/cloudflare/wildebeest
fix move followers/following
rodzic
7dff854773
commit
0d19dc7b48
|
@ -394,13 +394,8 @@ export async function handle(
|
|||
// TODO: eventually move to queue and move workers
|
||||
while (collection.items.length > 0) {
|
||||
const batch = collection.items.splice(0, 20)
|
||||
await Promise.all(
|
||||
batch.map(async (items) => {
|
||||
console.log({ items })
|
||||
await moveFollowers(db, localActor, items)
|
||||
console.log(`moved ${items.length} followers`)
|
||||
})
|
||||
)
|
||||
await moveFollowers(db, localActor, batch)
|
||||
console.log(`moved ${batch.length} followers`)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -412,12 +407,8 @@ export async function handle(
|
|||
// TODO: eventually move to queue and move workers
|
||||
while (collection.items.length > 0) {
|
||||
const batch = collection.items.splice(0, 20)
|
||||
await Promise.all(
|
||||
batch.map(async (items) => {
|
||||
await moveFollowing(db, localActor, items)
|
||||
console.log(`moved ${items.length} following`)
|
||||
})
|
||||
)
|
||||
await moveFollowing(db, localActor, batch)
|
||||
console.log(`moved ${batch.length} following`)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ export async function moveFollowers(db: D1Database, actor: Actor, followers: Arr
|
|||
const actorAcc = urlToHandle(actor.id)
|
||||
|
||||
for (let i = 0; i < followers.length; i++) {
|
||||
console.log(followers[i])
|
||||
const follower = new URL(followers[i])
|
||||
const followActor = await actors.getAndCache(follower, db)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue