diff --git a/pom.xml b/pom.xml index 38f4c89ea..2b72c8055 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ net.yacy yacycore - 1.81 + 1.83 jar YaCy - a Peer to Peer Web Search Engine YaCy diff --git a/source/net/yacy/search/ResourceObserver.java b/source/net/yacy/search/ResourceObserver.java index 62cd170e7..df0daa4e1 100644 --- a/source/net/yacy/search/ResourceObserver.java +++ b/source/net/yacy/search/ResourceObserver.java @@ -92,10 +92,12 @@ public class ResourceObserver { if (!this.sb.crawlJobIsPaused(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL)) { log.info("pausing local crawls"); this.sb.pauseCrawlJob(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL, "resource observer:" + reason); + this.sb.setConfig(SwitchboardConstants.CRAWLJOB_LOCAL_AUTODISABLED,true); } if (!this.sb.crawlJobIsPaused(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL)) { log.info("pausing remote triggered crawls"); this.sb.pauseCrawlJob(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL, "resource observer:" + reason); + this.sb.setConfig(SwitchboardConstants.CRAWLJOB_REMOTE_AUTODISABLED,true); } if ((this.normalizedDiskFree == Space.EXHAUSTED || this.normalizedMemoryFree != Space.AMPLE) && this.sb.getConfigBool(SwitchboardConstants.INDEX_RECEIVE_ALLOW, false)) { @@ -220,6 +222,14 @@ public class ResourceObserver { this.sb.setConfig(SwitchboardConstants.INDEX_RECEIVE_ALLOW, true); this.sb.peers.mySeed().setFlagAcceptRemoteIndex(true); this.sb.setConfig(SwitchboardConstants.INDEX_RECEIVE_AUTODISABLED, false); + } else if (this.sb.getConfigBool(SwitchboardConstants.CRAWLJOB_LOCAL_AUTODISABLED, false)) { + log.info("continue paused local crawls"); + this.sb.setConfig(SwitchboardConstants.CRAWLJOB_LOCAL_AUTODISABLED,false); + this.sb.continueCrawlJob(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL); + } else if (this.sb.getConfigBool(SwitchboardConstants.CRAWLJOB_REMOTE_AUTODISABLED, false)) { + log.info("continue paused remote triggered crawls"); + this.sb.setConfig(SwitchboardConstants.CRAWLJOB_REMOTE_AUTODISABLED,false); + this.sb.continueCrawlJob(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL); } log.info("resources ok"); } diff --git a/source/net/yacy/search/SwitchboardConstants.java b/source/net/yacy/search/SwitchboardConstants.java index df2c66e4c..03e32c9c5 100644 --- a/source/net/yacy/search/SwitchboardConstants.java +++ b/source/net/yacy/search/SwitchboardConstants.java @@ -475,7 +475,9 @@ public final class SwitchboardConstants { public static final String RESOURCE_DISK_USED_MAX_OVERSHOT = "resource.disk.used.max.overshot"; public static final String MEMORY_ACCEPTDHT = "memory.acceptDHTabove"; - public static final String INDEX_RECEIVE_AUTODISABLED = "memory.disabledDHT"; + public static final String INDEX_RECEIVE_AUTODISABLED = "memory.disabledDHT"; // set if DHT was disabled by ResourceObserver + public static final String CRAWLJOB_LOCAL_AUTODISABLED = "memory.disabledLocalCrawler"; // set if local crawl was disabled by ResourceObserver + public static final String CRAWLJOB_REMOTE_AUTODISABLED = "memory.disabledRemoteCrawler"; // set if remote crawl was disabled by ResourceObserver /* * Some constants