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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user