fix: #13254, configurable ap content prune

This commit is contained in:
Julian Lam
2025-03-19 10:17:09 -04:00
parent 28f7d6870a
commit 80e03c857e

View File

@@ -564,7 +564,7 @@ Notes.prune = async () => {
*/
winston.info('[notes/prune] Starting scheduled pruning of topics');
const start = '-inf';
const stop = Date.now() - (1000 * 60 * 60 * 24 * 30); // 30 days; todo: make configurable?
const stop = Date.now() - (1000 * 60 * 60 * 24 * meta.config.activitypubContentPruneDays);
let tids = await db.getSortedSetRangeByScore('cid:-1:tids', 0, -1, start, stop);
winston.info(`[notes/prune] Found ${tids.length} topics older than 30 days (since last activity).`);