perf: closes #13145, reduce calls in actors.prune

instead of deleting 18k users everyday delete max 500 every 30mins like notifications.prune

refactor getLocalFollowCounts so it works with an array of actors

dont make dbcalls for uids that dont exist
This commit is contained in:
Barış Soner Uşaklı
2025-02-11 10:39:24 -05:00
parent db0535838b
commit 676acb7e8c
2 changed files with 32 additions and 22 deletions

View File

@@ -68,7 +68,7 @@ ActivityPub.startJobs = () => {
}
}, null, true, null, null, false); // change last argument to true for debugging
new CronJob('0 1 * * *', async () => {
new CronJob('*/30 * * * *', async () => {
try {
await ActivityPub.actors.prune();
} catch (err) {