feat: Refactor database cleanup process by removing scripts and updating documentation to use the Activity Log for event management

This commit is contained in:
Arunavo Ray
2025-05-24 17:58:37 +05:30
parent 4efe741c64
commit d7ce2a6908
10 changed files with 6 additions and 266 deletions

View File

@@ -214,7 +214,7 @@ export async function removeDuplicateEvents(userId?: string): Promise<{ duplicat
/**
* Cleans up old events to prevent the database from growing too large
* Should be called periodically (e.g., daily via a cron job)
* This function is used by the cleanup button in the Activity Log page
*
* @param maxAgeInDays Number of days to keep events (default: 7)
* @param cleanupUnreadAfterDays Number of days after which to clean up unread events (default: 2x maxAgeInDays)