Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/ORCID/ORCID-Source
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro committed Apr 8, 2024
2 parents c52ef13 + b1e8a6c commit d4f779b
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 5 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## v2.57.10 - 2024-04-08

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.57.9...v2.57.10)

## v2.57.9 - 2024-04-08

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.57.8...v2.57.9)

## v2.57.8 - 2024-04-08

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.57.7...v2.57.8)

### Fix

- Update cron job time and fix issue with select in postgres (#7024)

## v2.57.7 - 2024-04-05

[Full Changelog](https://github.com/ORCID/ORCID-Source/compare/v2.57.6...v2.57.7)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
import org.orcid.api.notificationsV3.server.delegator.NotificationsApiServiceDelegator;
import org.orcid.core.api.OrcidApiConstants;
import org.orcid.core.exception.OrcidNotificationAlreadyReadException;
import org.orcid.core.togglz.Features;
import org.orcid.jaxb.model.v3.release.groupid.GroupIdRecord;
import org.orcid.jaxb.model.v3.release.notification.permission.NotificationPermission;
import org.orcid.jaxb.model.v3.release.record.Address;
Expand Down Expand Up @@ -1049,6 +1050,9 @@ public Response deleteResearchResource(@PathParam("orcid") String orcid, @PathPa
@Produces(value = { VND_ORCID_XML, ORCID_XML, MediaType.APPLICATION_XML, VND_ORCID_JSON, ORCID_JSON, MediaType.APPLICATION_JSON })
@Path(RECORD_SUMMARY)
public Response getRecordSummary(@PathParam("orcid") String orcid) {
if(!Features.MAPI_SUMMARY_ENDPOINT.isActive()) {
return Response.status(Response.Status.NOT_FOUND).build();
}
return serviceDelegator.getRecordSummary(orcid);
}
}
5 changes: 4 additions & 1 deletion orcid-core/src/main/java/org/orcid/core/togglz/Features.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ public enum Features implements Feature {
DELETE_EVENTS,

@Label("Track public events stats ")
PAPI_EVENTS;
PAPI_EVENTS,

@Label("Enable summary endpoint in the Members API")
MAPI_SUMMARY_ENDPOINT;

public boolean isActive() {
return FeatureContext.getFeatureManager().isActive(this);
Expand Down
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
2 changes: 1 addition & 1 deletion orcid-persistence/src/main/resources/db-master.xml
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@
<include file="/db/updates/dw_event_stats.xml" />
<include file="/db/updates/add_indexes_2024_02_20.xml" />
<include file="/db/updates/dw_views_with_4_months_interval.xml" />
<include file="/db/updates/dw_papi_event_stats.xml" />
<include file="/db/updates/add_ip_col_in_events.xml" />
<include file="/db/updates/alter_ip_col_in_events.xml" />
<include file="/db/updates/dw_papi_event_stats.xml" />
</databaseChangeLog>
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 d4f779b

Please sign in to comment.