Update code
This commit is contained in:
@@ -40,8 +40,16 @@ public class ApplicationEvaluationScheduler {
|
||||
@Scheduled(cron = "0 0 2 * * ?") // Runs daily at midnight
|
||||
public void updateExpiredEvaluations() {
|
||||
log.info("Starting the Application Evaluation Expiration scheduler...");
|
||||
Utils.setHttpServletRequestForScheduler();
|
||||
try {
|
||||
|
||||
Utils.setHttpServletRequestForScheduler();
|
||||
|
||||
// Logging user action for the scheduler operation
|
||||
loggingUtil.logUserActionWithoutToken(
|
||||
UserActionRequest.builder().request(httpServletRequest).actionType(UserActionLogsEnum.SCHEDULER)
|
||||
.actionContext(UserActionContextEnum.EVALUATION_EXPIRATION_SCHEDULER).build());
|
||||
|
||||
|
||||
processExpiredEvaluation();
|
||||
log.info("Completed the process of updating expiring application evaluations.");
|
||||
} catch (Exception e) {
|
||||
@@ -55,11 +63,7 @@ public class ApplicationEvaluationScheduler {
|
||||
private void processExpiredEvaluation() {
|
||||
log.info("Starting the process of expiring application evaluations.");
|
||||
|
||||
// Logging user action for the scheduler operation
|
||||
loggingUtil.logUserActionWithoutToken(
|
||||
UserActionRequest.builder().request(httpServletRequest).actionType(UserActionLogsEnum.SCHEDULER)
|
||||
.actionContext(UserActionContextEnum.EVALUATION_EXPIRATION_SCHEDULER).build());
|
||||
|
||||
|
||||
try {
|
||||
List<ApplicationEvaluationEntity> evaluations = applicationEvaluationRepository
|
||||
.findAllByIsDeletedFalseAndEndDateBefore(
|
||||
|
||||
Reference in New Issue
Block a user