Skip to content

Commit

Permalink
Merge pull request #6957 from ORCID/AddWorksEmailGranularConfigProps
Browse files Browse the repository at this point in the history
Add works email granular config props
  • Loading branch information
amontenegro authored Dec 20, 2023
2 parents b075441 + 6cc1c1c commit 9993612
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,9 @@ 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<Pair<String, String>> elements = profileDaoReadOnly.findEmailsToSendAddWorksEmail(addWorksAttemptEmail);
LOGGER.debug("Found {} add works reminders to send" , elements.size());
for (Pair<String, String> element: elements) {
String email = element.getLeft();
String userOrcid = element.getRight();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
<task:scheduled ref="orgLoadManager" method="loadOrgs" cron="${org.orcid.scheduler.web.orgImportsCronConfig}" />
<task:scheduled ref="issnLoadManager" method="loadIssn" cron="${org.orcid.scheduler.web.loadIssnCronConfig:0 0 0 * * FRI}"/>
<task:scheduled ref="autoLockSpamRecords" method="scheduledProcess" cron="${org.orcid.scheduler.autospam.process:0 0 0 * * TUE}"/>
<task:scheduled ref="emailMessageSender" method="addWorksToRecordFirstReminder" cron="${org.orcid.scheduler.web.addWorksToRecord:0 10 * * * *}"/>
<task:scheduled ref="emailMessageSender" method="addWorksToRecordSecondReminder" cron="${org.orcid.scheduler.web.addWorksToRecord:0 20 * * * *}"/>
<task:scheduled ref="emailMessageSender" method="addWorksToRecordThirdReminder" cron="${org.orcid.scheduler.web.addWorksToRecord:0 30 * * * *}"/>
<task:scheduled ref="emailMessageSender" method="addWorksToRecordFirstReminder" cron="${org.orcid.scheduler.web.addWorksToRecord.firstReminder:0 10 * * * *}"/>
<task:scheduled ref="emailMessageSender" method="addWorksToRecordSecondReminder" cron="${org.orcid.scheduler.web.addWorksToRecord.secondReminder:0 20 * * * *}"/>
<task:scheduled ref="emailMessageSender" method="addWorksToRecordThirdReminder" cron="${org.orcid.scheduler.web.addWorksToRecord.thirdReminder:0 30 * * * *}"/>
</task:scheduled-tasks>

<task:scheduler id="scheduler" pool-size="${org.orcid.scheduler.tasks.pool_size:30}"/>
Expand Down

0 comments on commit 9993612

Please sign in to comment.