mirror of
https://github.com/yacy/yacy_search_server.git
synced 2025-07-18 08:36:07 -04:00
fixed htcache-store problem and due-time for remote crawls
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@393 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
source/de/anomic
@ -329,7 +329,7 @@ public final class plasmaCrawlWorker extends Thread {
|
||||
remote.close();
|
||||
log.logInfo("REJECTED WRONG MIME TYPE " + res.responseHeader.mime() + " for url " + url.toString());
|
||||
htCache.status = plasmaHTCache.CACHE_UNFILLED;
|
||||
} else if ((profile == null) || ((profile.storeHTCache()) && ((error = htCache.shallStoreCache()) == null))) {
|
||||
} else {
|
||||
// we write the new cache entry to file system directly
|
||||
cacheFile.getParentFile().mkdirs();
|
||||
FileOutputStream fos = null;
|
||||
@ -340,11 +340,6 @@ public final class plasmaCrawlWorker extends Thread {
|
||||
if (fos!=null)try{fos.close();}catch(Exception e){}
|
||||
}
|
||||
htCache.status = plasmaHTCache.CACHE_FILL;
|
||||
} else {
|
||||
if (error != null) log.logDebug("CRAWLER NOT STORED RESOURCE " + url.toString() + ": " + error);
|
||||
// anyway, the content still lives in the content scraper
|
||||
htCache.cacheArray = res.writeContent(null); // writes only into cacheArray
|
||||
htCache.status = plasmaHTCache.CACHE_PASSING;
|
||||
}
|
||||
// enQueue new entry with response header
|
||||
if (profile != null) {
|
||||
|
@ -177,6 +177,7 @@ public class yacyDHTAction implements yacyPeerAction {
|
||||
while (se.hasMoreElements()) {
|
||||
s = (yacySeed) se.nextElement();
|
||||
if (s == null) return null;
|
||||
s.available = seedCrawlReady.getScore(s.hash);
|
||||
if (available) {
|
||||
if (seedCrawlReady.getScore(s.hash) < yacyCore.yacyTime()) return s;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user