Skip to content

Commit

Permalink
Merge pull request #6918 from ORCID/8889-prod-looks-like-the-ror-load…
Browse files Browse the repository at this point in the history
…er-is-broken

8889 prod looks like the ror loader is broken
  • Loading branch information
amontenegro authored Oct 30, 2023
2 parents 33928a0 + ccc9e82 commit 263c224
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public class OrgDataClient {
*/
public <T> T get(String url, String userAgent, Class<T> type) {
JerseyClientResponse<T, String> response = jerseyClientHelperForOrgLoaders.executeGetRequest(url, null, null, false, Map.of(), Map.of("User-Agent", userAgent), type, String.class);
int status = response.getStatus();
int status = response.getStatus();
if (status != 200) {
LOGGER.warn("Unable to fetch file {}: {}", new Object[] { url, status });
LOGGER.error("Unable to fetch file {}: {}", new Object[] { url, status });
return null;
}
return response.getEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class RorOrgLoadSource implements OrgLoadSource {
@Resource
private OrgDisambiguatedExternalIdentifierDao orgDisambiguatedExternalIdentifierDao;

@Value("${org.orcid.core.orgs.ror.zenodoRecordsUrl:https://zenodo.org/api/records/?communities=ror-data}")
@Value("${org.orcid.core.orgs.ror.zenodoRecordsUrl:https://zenodo.org/api/records?communities=ror-data}")
private String rorZenodoRecordsUrl;

@Resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = { "aggregations", "links" })
@JsonIgnoreProperties(ignoreUnknown = true)
public class ZenodoRecords {

@JsonProperty("hits")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package org.orcid.scheduler.loader.source.zenodo.api;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class ZenodoRecordsFile {

@JsonProperty("bucket")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package org.orcid.scheduler.loader.source.zenodo.api;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class ZenodoRecordsFileLinks {

@JsonProperty("self")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = { "metadata", "owners", "stats", "revision" })
@JsonIgnoreProperties(ignoreUnknown = true)
public class ZenodoRecordsHit {

@JsonProperty("conceptdoi")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package org.orcid.scheduler.loader.source.zenodo.api;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class ZenodoRecordsHitLinks {

@JsonProperty("badge")
Expand Down
2 changes: 1 addition & 1 deletion properties/development.properties
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ org.orcid.core.orgs.fundref.localFilePath=/tmp/some/path

# ROR org imports
org.orcid.core.orgs.ror.enabled=false
org.orcid.core.orgs.ror.zenodoRecordsUrl=https://zenodo.org/api/records/?communities=ror-data
org.orcid.core.orgs.ror.zenodoRecordsUrl=https://zenodo.org/api/records?communities=ror-data
org.orcid.core.orgs.ror.localDataPath=/tmp/ror/ror.json
org.orcid.core.orgs.ror.localZipPath=/tmp/ror/ror.zip

Expand Down

0 comments on commit 263c224

Please sign in to comment.