refactor: Clean up cron initialization logs

Single summary line instead of verbose duplicates:
[INFO] Cron jobs initialized: Calendar (07:00), Audit cleanup (00:00)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
richardtekula
2025-12-17 09:50:03 +01:00
parent 2dadc67013
commit 095a3a5b03
3 changed files with 26 additions and 40 deletions

View File

@@ -6,15 +6,18 @@ import { startAuditCleanupCron, cleanupOldAuditLogs } from './cleanupAuditLogs.j
* Start all cron jobs
*/
export const startAllCronJobs = () => {
logger.info('=== Inicializujem cron jobs ===');
const jobs = [];
// Calendar event notifications
startCalendarNotificationCron();
const calendarJob = startCalendarNotificationCron();
jobs.push(calendarJob);
// Audit logs cleanup (daily at midnight)
startAuditCleanupCron();
// Audit logs cleanup
const auditJob = startAuditCleanupCron();
jobs.push(auditJob);
logger.info('=== Všetky cron jobs inicializované ===');
// Log summary
logger.info(`Cron jobs initialized: ${jobs.map(j => j.name).join(', ')}`);
};
// Export individual functions for testing/manual triggers