diff --git a/backend/src/main/java/com/thughari/jobtrackerpro/service/JobService.java b/backend/src/main/java/com/thughari/jobtrackerpro/service/JobService.java index e642ebe..0f0e561 100644 --- a/backend/src/main/java/com/thughari/jobtrackerpro/service/JobService.java +++ b/backend/src/main/java/com/thughari/jobtrackerpro/service/JobService.java @@ -248,17 +248,17 @@ public void finalizeManualSync(String email, String historyId) { public void cleanupStaleApplications() { LocalDateTime now = LocalDateTime.now(ZoneOffset.UTC); - LocalDateTime threeMonthsAgo = now.minusMonths(2); + LocalDateTime twoMonthsAgo = now.minusMonths(2); - List affectedEmails = jobRepository.findUserEmailsWithStaleJobs(threeMonthsAgo); + List affectedEmails = jobRepository.findUserEmailsWithStaleJobs(twoMonthsAgo); if (affectedEmails.isEmpty()) { log.info("System Cleanup: No stale applications found."); return; } - String autoNote = "\n[" + now.format(fmt) + "] Status auto-set to Rejected (3 months inactivity)."; - jobRepository.markStaleJobsAsRejected(threeMonthsAgo, now, autoNote); + String autoNote = "\n[" + now.format(fmt) + "] Status auto-set to Rejected (2 months inactivity)."; + jobRepository.markStaleJobsAsRejected(twoMonthsAgo, now, autoNote); affectedEmails.forEach(cacheEvictService::evictAllForUser);