From 32753e2216445f753d83b45492d347af9148a91f Mon Sep 17 00:00:00 2001 From: Daniel Palafox Date: Fri, 19 Jan 2024 13:36:52 -0500 Subject: [PATCH 1/5] fix: Remove incorrect zero in saveEventStats cron job --- .../src/main/resources/orcid-scheduler-context.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml b/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml index 11b7dec2c5c..53cd44e688e 100644 --- a/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml +++ b/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml @@ -42,7 +42,7 @@ - + From 9af1ede91b86d01021b29db816f50770cb704007 Mon Sep 17 00:00:00 2001 From: Daniel Palafox Date: Fri, 19 Jan 2024 13:37:40 -0500 Subject: [PATCH 2/5] fix: Replace logger to info level in cron save and delete events --- .../org/orcid/scheduler/web/event/impl/EventStatsImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/web/event/impl/EventStatsImpl.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/web/event/impl/EventStatsImpl.java index 304d8c47c2a..b77eac25a28 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/web/event/impl/EventStatsImpl.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/web/event/impl/EventStatsImpl.java @@ -28,14 +28,14 @@ public class EventStatsImpl implements EventStats { public void saveEventStats() { LocalDate date = LocalDate.now().minusDays(1); String currentDate = date.getDayOfMonth() + "/" + date.getMonth() + "/" + date.getYear(); - LOGGER.debug("Storing aggregate data to event_stats table of the day" + currentDate); + LOGGER.info("Storing aggregate data to event_stats table of the day" + currentDate); eventStatsDao.createEventStats(); } @Override public void deleteEvents() { if (Features.DELETE_EVENTS.isActive()) { - LOGGER.debug("Deleting events older than "+ DELETE_EVENTS_OLDER_THAN_DAYS +" days"); + LOGGER.info("Deleting events older than "+ DELETE_EVENTS_OLDER_THAN_DAYS +" days"); eventDao.deleteEventsByDate(DELETE_EVENTS_OLDER_THAN_DAYS); } } From 53943689ce2b8edb25a623eb5ddee4cf9e967f3b Mon Sep 17 00:00:00 2001 From: Daniel Palafox Date: Fri, 19 Jan 2024 14:16:36 -0500 Subject: [PATCH 3/5] fix: Run save events stats 10 min after delete events --- .../src/main/resources/orcid-scheduler-context.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml b/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml index 53cd44e688e..8aa487d4c99 100644 --- a/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml +++ b/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml @@ -42,7 +42,7 @@ - + From 44e2426dd977572d1575d658ccb86e58b6bca8b1 Mon Sep 17 00:00:00 2001 From: Daniel Palafox Date: Fri, 19 Jan 2024 14:24:30 -0500 Subject: [PATCH 4/5] fix: Run cron jobs at 00:10 and 00:20 everyday --- .../src/main/resources/orcid-scheduler-context.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml b/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml index 8aa487d4c99..9e6981bca51 100644 --- a/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml +++ b/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml @@ -41,8 +41,8 @@ - - + + From d36b69097b3cc38e7892e656c592f931ea6ec5ac Mon Sep 17 00:00:00 2001 From: amontenegro Date: Fri, 19 Jan 2024 14:02:18 -0600 Subject: [PATCH 5/5] Remove extra * --- .../src/main/resources/orcid-scheduler-context.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml b/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml index 9e6981bca51..4c4af0b225a 100644 --- a/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml +++ b/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml @@ -42,7 +42,7 @@ - +