mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: remove activities older than a week
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user