Skip to content

Commit

Permalink
Merge pull request #6977 from ORCID/fix/9009-tech-cron-job-to-store-d…
Browse files Browse the repository at this point in the history
…aily-stats

Fix/9009 tech cron job to store daily stats
  • Loading branch information
amontenegro authored Jan 19, 2024
2 parents 329410c + d36b690 commit abc9fff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<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 ref="eventStats" method="deleteEvents" cron="${org.orcid.scheduler.web.deleteEventsOlderDays:0 10 * * * *}"/>
<task:scheduled ref="eventStats" method="saveEventStats" cron="${org.orcid.scheduler.web.saveEventStats:15 10 0 * * *}"/>
<task:scheduled ref="eventStats" method="deleteEvents" cron="${org.orcid.scheduler.web.deleteEventsOlderDays:0 10 0 * * *}"/>
<task:scheduled ref="eventStats" method="saveEventStats" cron="${org.orcid.scheduler.web.saveEventStats:0 20 0 * * *}"/>
</task:scheduled-tasks>

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

0 comments on commit abc9fff

Please sign in to comment.