Skip to content

Commit 651fb9f

Browse files
committed
2 months ago
1 parent 1851b38 commit 651fb9f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

backend/src/main/java/com/thughari/jobtrackerpro/service/JobService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,17 +248,17 @@ public void finalizeManualSync(String email, String historyId) {
248248

249249
public void cleanupStaleApplications() {
250250
LocalDateTime now = LocalDateTime.now(ZoneOffset.UTC);
251-
LocalDateTime threeMonthsAgo = now.minusMonths(2);
251+
LocalDateTime twoMonthsAgo = now.minusMonths(2);
252252

253-
List<String> affectedEmails = jobRepository.findUserEmailsWithStaleJobs(threeMonthsAgo);
253+
List<String> affectedEmails = jobRepository.findUserEmailsWithStaleJobs(twoMonthsAgo);
254254

255255
if (affectedEmails.isEmpty()) {
256256
log.info("System Cleanup: No stale applications found.");
257257
return;
258258
}
259259

260-
String autoNote = "\n[" + now.format(fmt) + "] Status auto-set to Rejected (3 months inactivity).";
261-
jobRepository.markStaleJobsAsRejected(threeMonthsAgo, now, autoNote);
260+
String autoNote = "\n[" + now.format(fmt) + "] Status auto-set to Rejected (2 months inactivity).";
261+
jobRepository.markStaleJobsAsRejected(twoMonthsAgo, now, autoNote);
262262

263263
affectedEmails.forEach(cacheEvictService::evictAllForUser);
264264

0 commit comments

Comments
 (0)