From 7ebb02afae2de54845d886598295885506f96509 Mon Sep 17 00:00:00 2001 From: Daniel Palafox Date: Mon, 8 Apr 2024 12:31:35 -0600 Subject: [PATCH] fix: Update cron job time and fix issue with select in postgres --- .../org/orcid/persistence/dao/impl/EventStatsDaoImpl.java | 2 +- .../src/main/resources/orcid-scheduler-context.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/orcid-persistence/src/main/java/org/orcid/persistence/dao/impl/EventStatsDaoImpl.java b/orcid-persistence/src/main/java/org/orcid/persistence/dao/impl/EventStatsDaoImpl.java index 5245acc6e8e..17078408ef8 100644 --- a/orcid-persistence/src/main/java/org/orcid/persistence/dao/impl/EventStatsDaoImpl.java +++ b/orcid-persistence/src/main/java/org/orcid/persistence/dao/impl/EventStatsDaoImpl.java @@ -48,7 +48,7 @@ public List findAll() { @Transactional public void createPapiEventStats() { String query = - "SELECT event_type, client_id, ip, label, count(*), CAST(date_created as date), now(), now() " + + "SELECT event_type, client_id, ip, label, count(*), CAST(date_created as date) as date, now() as date_created, now() as last_modified " + "FROM event " + "WHERE event_type = '"+ EventType.PAPI.getValue() + "' " + "AND CAST(date_created as date) = CAST(now() - (CAST('1' AS INTERVAL DAY) * 1) as date) " + 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 0a3bf32b1ea..897d1e1a90b 100644 --- a/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml +++ b/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml @@ -43,8 +43,8 @@ - - + +