- Reduce the "PublicationsRetriever.threadsMultiplier" to 4.

- Eliminate a possible NPE.
master
Lampros Smyrnaios 2 years ago
parent c46c8c448a
commit a8e2ddcf54

@ -52,7 +52,7 @@ public class PublicationsRetrieverPlugin {
ConnSupportUtils.shouldBlockMost5XXDomains = false; ConnSupportUtils.shouldBlockMost5XXDomains = false;
LoaderAndChecker.setCouldRetryRegex(); LoaderAndChecker.setCouldRetryRegex();
PublicationsRetriever.threadsMultiplier = 6; PublicationsRetriever.threadsMultiplier = 4;
int workerThreadsCount = Runtime.getRuntime().availableProcessors() * PublicationsRetriever.threadsMultiplier; int workerThreadsCount = Runtime.getRuntime().availableProcessors() * PublicationsRetriever.threadsMultiplier;
logger.info("Use " + workerThreadsCount + " worker-threads."); logger.info("Use " + workerThreadsCount + " worker-threads.");
PublicationsRetriever.executor = Executors.newFixedThreadPool(workerThreadsCount); PublicationsRetriever.executor = Executors.newFixedThreadPool(workerThreadsCount);
@ -157,7 +157,7 @@ public class PublicationsRetrieverPlugin {
//logger.debug("initialId: " + initialId); // DEBUG! //logger.debug("initialId: " + initialId); // DEBUG!
// Search that ID inside the list and if that instance gave the docUrl (there might be multiple ID instances) then get the file-location. // Search that ID inside the list and if that instance gave the docUrl (there might be multiple ID instances) then get the file-location.
for ( DataToBeLogged data_2 : FileUtils.dataToBeLoggedList ) { for ( DataToBeLogged data_2 : FileUtils.dataToBeLoggedList ) {
if ( data_2.getUrlId().equals(initialId) && data_2.getWasDocumentOrDatasetAccessible().equals("true") ) { if ( data_2.getUrlId().equals(initialId) && ("true".equals(data_2.getWasDocumentOrDatasetAccessible())) ) {
fileLocation = data_2.getComment(); fileLocation = data_2.getComment();
size = data_2.getSize(); size = data_2.getSize();
hash = data_2.getHash(); hash = data_2.getHash();

Loading…
Cancel
Save