remove wrong log line in CrawlSwitchboard

+ don't allow CrawlSwitchboard to exit application
making network param unused
pull/62/head
reger 9 years ago
parent 7bac756720
commit 8d58a48029

@ -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>();

@ -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 =

Loading…
Cancel
Save