Skip to content

Commit

Permalink
fix: Update cron job time and fix issue with select in postgres (#7024)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Palafox <[email protected]>
  • Loading branch information
DanielPalafox and Daniel Palafox authored Apr 8, 2024
1 parent 3c26ac6 commit d832614
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public List<EventStatsEntity> 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) " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<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 0 * * *}"/>
<task:scheduled ref="eventStats" method="saveEventStats" cron="${org.orcid.scheduler.web.saveEventStats:0 20 0 * * *}"/>
<task:scheduled ref="eventStats" method="savePapiEventStats" cron="${org.orcid.scheduler.web.savePapiEventStats:0 30 * * * *}"/>
<task:scheduled ref="eventStats" method="deletePapiEvents" cron="${org.orcid.scheduler.web.deletePapiEvents:0 40 * * * *}"/>
<task:scheduled ref="eventStats" method="savePapiEventStats" cron="${org.orcid.scheduler.web.savePapiEventStats:0 55 0 * * *}"/>
<task:scheduled ref="eventStats" method="deletePapiEvents" cron="${org.orcid.scheduler.web.deletePapiEvents:0 40 0 * * *}"/>
</task:scheduled-tasks>

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

0 comments on commit d832614

Please sign in to comment.