diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js index fa59c8450c..b09ee6b3db 100644 --- a/src/activitypub/notes.js +++ b/src/activitypub/notes.js @@ -778,7 +778,9 @@ async function pruneCidTids(cid, cuttoff) { max: cuttoff, batch: 500, }); - + if (!tidsWithNoEngagement.length) { + return; + } winston.info(`[notes/prune] ${tidsWithNoEngagement.length} topics eligible in cid:${cid} for pruning`); await batch.processArray(tidsWithNoEngagement, async (tids) => {