refactor: update cleanup and schedule config to use seconds for retentionDays and improve nextRun calculation

This commit is contained in:
Arunavo Ray
2025-05-24 20:12:27 +05:30
parent 7afe364a24
commit a28a766f8b
7 changed files with 212 additions and 41 deletions

View File

@@ -54,7 +54,7 @@ export const configSchema = z.object({
}),
cleanupConfig: z.object({
enabled: z.boolean().default(false),
retentionDays: z.number().min(1).default(7), // in days
retentionDays: z.number().min(1).default(604800), // in seconds (default: 7 days)
lastRun: z.date().optional(),
nextRun: z.date().optional(),
}),