Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

remove wrong log line in CrawlSwitchboard + don't allow CrawlSwitchboard to exit application making network param unused

reger8d58a480294a
diff --git a/source/net/yacy/crawler/CrawlSwitchboard.java b/source/net/yacy/crawler/CrawlSwitchboard.java
index f6e5c1619..ac2a6244c 100644
--- a/source/net/yacy/crawler/CrawlSwitchboard.java
+++ b/source/net/yacy/crawler/CrawlSwitchboard.java
@@ -59,8 +59,8 @@ import net.yacy.search.SwitchboardConstants;
public final class CrawlSwitchboard {
- public static final String CRAWL_PROFILE_AUTOCRAWL_DEEP = "autocrawlDeep";
- public static final String CRAWL_PROFILE_AUTOCRAWL_SHALLOW = "autocrawlShallow";
+ public static final String CRAWL_PROFILE_AUTOCRAWL_DEEP = "autocrawlDeep";
+ public static final String CRAWL_PROFILE_AUTOCRAWL_SHALLOW = "autocrawlShallow";
public static final String CRAWL_PROFILE_PROXY = "proxy";
public static final String CRAWL_PROFILE_REMOTE = "remote";
public static final String CRAWL_PROFILE_SNIPPET_LOCAL_TEXT = "snippetLocalText";
@@ -107,18 +107,12 @@ public final class CrawlSwitchboard {
private final File queuesRoot;
private Switchboard switchboard;
- public CrawlSwitchboard(final String networkName, Switchboard switchboard) {
+ public CrawlSwitchboard(Switchboard switchboard) {
this.switchboard = switchboard;
this.log = this.switchboard.log;
this.queuesRoot = this.switchboard.queuesRoot;
this.defaultPushProfiles = new ConcurrentHashMap<>();
- this.log.info("Initializing Word Index for the network '" + networkName + "'.");
-
- if ( networkName == null || networkName.isEmpty() ) {
- log.severe("no network name given - shutting down");
- System.exit(0);
- }
this.profilesActiveCrawlsCache = Collections.synchronizedMap(new TreeMap<byte[], CrawlProfile>(Base64Order.enhancedCoder));
this.profilesActiveCrawlsCounter = new ConcurrentHashMap<String, RowHandleSet>();
diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.java
index 174ba7d57..290a32115 100644
--- a/source/net/yacy/search/Switchboard.java
+++ b/source/net/yacy/search/Switchboard.java
@@ -607,7 +607,7 @@ public final class Switchboard extends serverSwitch {
}
// create a crawler
- this.crawler = new CrawlSwitchboard(networkName, this);
+ this.crawler = new CrawlSwitchboard(this);
// start yacy core
this.log.config("Starting YaCy Protocol Core");
@@ -1398,7 +1398,7 @@ public final class Switchboard extends serverSwitch {
// create a crawler
this.crawlQueues.relocate(this.queuesRoot); // cannot be closed because the busy threads are working with that object
- this.crawler = new CrawlSwitchboard(networkName, this);
+ this.crawler = new CrawlSwitchboard(this);
// init a DHT transmission dispatcher
this.dhtDispatcher =