From 63e2fc52b9d6afbc7e6a91f71e3327b2ad9d0fa7 Mon Sep 17 00:00:00 2001 From: amontenegro Date: Wed, 20 Dec 2023 10:24:51 -0600 Subject: [PATCH 1/4] Add more logs --- .../scheduler/email/cli/manager/EmailMessageSenderImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java index b36033c2e4f..b76ef455046 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java @@ -624,6 +624,7 @@ synchronized public void addWorksToRecordThirdReminder() { private void sendAddWorksToRecordEmailAttempt(int addWorksAttemptEmail, ProfileEventType profileEventType){ if (Features.SEND_ADD_WORKS_EMAILS.isActive()) { + LOGGER.info("Sending 'Add works' email reminder for {} days", addWorksAttemptEmail); List> elements = profileDaoReadOnly.findEmailsToSendAddWorksEmail(addWorksAttemptEmail); for (Pair element: elements) { String email = element.getLeft(); From 3b7af572cd89ebef54241834fb3c30961872607e Mon Sep 17 00:00:00 2001 From: amontenegro Date: Wed, 20 Dec 2023 10:27:26 -0600 Subject: [PATCH 2/4] Add more loggin --- .../orcid/persistence/dao/impl/ProfileEventDaoImpl.java | 8 ++++---- .../email/cli/manager/EmailMessageSenderImpl.java | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/orcid-persistence/src/main/java/org/orcid/persistence/dao/impl/ProfileEventDaoImpl.java b/orcid-persistence/src/main/java/org/orcid/persistence/dao/impl/ProfileEventDaoImpl.java index 549ea03aac3..45d528c3386 100644 --- a/orcid-persistence/src/main/java/org/orcid/persistence/dao/impl/ProfileEventDaoImpl.java +++ b/orcid-persistence/src/main/java/org/orcid/persistence/dao/impl/ProfileEventDaoImpl.java @@ -1,13 +1,13 @@ package org.orcid.persistence.dao.impl; +import java.math.BigInteger; + +import javax.persistence.Query; + import org.orcid.persistence.dao.ProfileEventDao; import org.orcid.persistence.jpa.entities.ProfileEventEntity; import org.orcid.persistence.jpa.entities.ProfileEventType; -import javax.persistence.Query; -import java.math.BigInteger; -import java.util.List; - /** * * @author Daniel Palafox diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java index b76ef455046..743f45f095d 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java @@ -626,6 +626,7 @@ private void sendAddWorksToRecordEmailAttempt(int addWorksAttemptEmail, ProfileE if (Features.SEND_ADD_WORKS_EMAILS.isActive()) { LOGGER.info("Sending 'Add works' email reminder for {} days", addWorksAttemptEmail); List> elements = profileDaoReadOnly.findEmailsToSendAddWorksEmail(addWorksAttemptEmail); + LOGGER.debug("Found {} emails to send" , elements.size()); for (Pair element: elements) { String email = element.getLeft(); String userOrcid = element.getRight(); From 7158fbf63f3558edcfe193dfd60d089d67917713 Mon Sep 17 00:00:00 2001 From: amontenegro Date: Wed, 20 Dec 2023 10:28:39 -0600 Subject: [PATCH 3/4] Better message --- .../scheduler/email/cli/manager/EmailMessageSenderImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java index 743f45f095d..d854f456710 100644 --- a/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java +++ b/orcid-scheduler-web/src/main/java/org/orcid/scheduler/email/cli/manager/EmailMessageSenderImpl.java @@ -626,7 +626,7 @@ private void sendAddWorksToRecordEmailAttempt(int addWorksAttemptEmail, ProfileE if (Features.SEND_ADD_WORKS_EMAILS.isActive()) { LOGGER.info("Sending 'Add works' email reminder for {} days", addWorksAttemptEmail); List> elements = profileDaoReadOnly.findEmailsToSendAddWorksEmail(addWorksAttemptEmail); - LOGGER.debug("Found {} emails to send" , elements.size()); + LOGGER.debug("Found {} add works reminders to send" , elements.size()); for (Pair element: elements) { String email = element.getLeft(); String userOrcid = element.getRight(); From 6cc1c1cc21a87e16ca9b3c776f92fd0474acfc0a Mon Sep 17 00:00:00 2001 From: amontenegro Date: Wed, 20 Dec 2023 10:38:26 -0600 Subject: [PATCH 4/4] One config setting per reminder --- .../src/main/resources/orcid-scheduler-context.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 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 5da8c3ca224..d5933d38a2c 100644 --- a/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml +++ b/orcid-scheduler-web/src/main/resources/orcid-scheduler-context.xml @@ -38,9 +38,9 @@ - - - + + +