From d9e86c7b07cda2df1bd0b4cff2460bab0474e7d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 18 Feb 2025 12:06:02 -0500 Subject: [PATCH] feat: remove activities older than a week --- src/activitypub/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/activitypub/index.js b/src/activitypub/index.js index 08a33ecdf1..88f915691d 100644 --- a/src/activitypub/index.js +++ b/src/activitypub/index.js @@ -63,6 +63,7 @@ ActivityPub.startJobs = () => { new CronJob('0 0 * * *', async () => { try { await ActivityPub.notes.prune(); + await db.sortedSetsRemoveRangeByScore(['activities:datetime'], '-inf', Date.now() - 604800000); } catch (err) { winston.error(err.stack); }