Update code

This commit is contained in:
nisha
2024-11-28 12:42:20 +05:30
parent 51998245d6
commit 35669bae39

View File

@@ -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,10 +63,6 @@ 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