Skip to content

Commit

Permalink
Scale the sleep time to 10 to 15 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
khoa-nd committed Oct 30, 2015
1 parent d532e90 commit 7b01990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/techlooper/cron/JobAlertEmailSender.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public synchronized void sendJobAlertEmail() throws Exception {

if (!jobAlertRegistrationEntities.isEmpty()) {
int count = 0;
Thread.sleep(getRandomNumberInRange(600000, 900000));
Thread.sleep(getRandomNumberInRange(600000, 900000) + 600000);
for (JobAlertRegistrationEntity jobAlertRegistrationEntity : jobAlertRegistrationEntities) {
if (StringUtils.isEmpty(jobAlertRegistrationEntity.getLastEmailSentDateTime())) {
jobAlertRegistrationEntity.setLastEmailSentDateTime(yesterdayDate(BASIC_DATE_TIME_PATTERN));
Expand Down

0 comments on commit 7b01990

Please sign in to comment.