forked from lsmyrnaios/UrlsWorker
- Reduce the "PublicationsRetriever.threadsMultiplier" to 4.
- Eliminate a possible NPE.
This commit is contained in:
parent
c46c8c448a
commit
a8e2ddcf54
|
@ -52,7 +52,7 @@ public class PublicationsRetrieverPlugin {
|
|||
ConnSupportUtils.shouldBlockMost5XXDomains = false;
|
||||
LoaderAndChecker.setCouldRetryRegex();
|
||||
|
||||
PublicationsRetriever.threadsMultiplier = 6;
|
||||
PublicationsRetriever.threadsMultiplier = 4;
|
||||
int workerThreadsCount = Runtime.getRuntime().availableProcessors() * PublicationsRetriever.threadsMultiplier;
|
||||
logger.info("Use " + workerThreadsCount + " worker-threads.");
|
||||
PublicationsRetriever.executor = Executors.newFixedThreadPool(workerThreadsCount);
|
||||
|
@ -157,7 +157,7 @@ public class PublicationsRetrieverPlugin {
|
|||
//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.
|
||||
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();
|
||||
size = data_2.getSize();
|
||||
hash = data_2.getHash();
|
||||
|
|
Loading…
Reference in New Issue