mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-11-03 20:45:58 +01:00 
			
		
		
		
	feat: remove activities older than a week
This commit is contained in:
		@@ -61,6 +61,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