Integrate some changes from the "PublicationsRetrieverPlugin".

master
Lampros Smyrnaios 2 years ago
parent 8abb260d60
commit d61ff4b6dd

@ -101,7 +101,7 @@ public class PublicationsRetrieverPlugin {
}
if ( UrlUtils.docOrDatasetUrlsWithIDs.containsKey(url) ) { // If we got into an already-found docUrl, log it and return.
ConnSupportUtils.handleReCrossedDocUrl(id, url, url, url, logger, true);
ConnSupportUtils.handleReCrossedDocUrl(id, url, url, url, true);
return true;
}
@ -209,13 +209,14 @@ public class PublicationsRetrieverPlugin {
public static boolean connectWithUrlTest(String urlToCheck) {
String testID = "testID";
try {
return HttpConnUtils.connectAndCheckMimeType("null", urlToCheck, urlToCheck, urlToCheck, null, true, false); // Sent the < null > in quotes to avoid an NPE in the concurrent data-structures.
return HttpConnUtils.connectAndCheckMimeType(testID, urlToCheck, urlToCheck, urlToCheck, null, true, false); // Sent the < null > in quotes to avoid an NPE in the concurrent data-structures.
} catch (Exception e) {
List<String> list = LoaderAndChecker.getWasValidAndCouldRetry(e);
String wasUrlValid = list.get(0);
String couldRetry = list.get(1);
UrlUtils.logOutputData(null, urlToCheck, null, "unreachable", "Discarded at loading time, due to connectivity problems.", null, true, "true", wasUrlValid, "false", "false", couldRetry, null, null);
UrlUtils.logOutputData(testID, urlToCheck, null, "unreachable", "Discarded at loading time, due to connectivity problems.", null, true, "true", wasUrlValid, "false", "false", couldRetry, null, null);
return false;
}
}

Loading…
Cancel
Save