From 0bac7035306926eb3393888312d6d4f67a1fb815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 27 Feb 2026 19:02:35 -0500 Subject: [PATCH] return early --- src/activitypub/notes.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) => {