Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
moved startup execAPIActions call after Jetty startup execAPIActions require http to be up. The 10s sleep was sufficient to allow Jetty to start, but it's more robust to place the call after http is assigned to switchboard/serverSwitch.
regere9081c0f17c5
diff --git a/source/net/yacy/search/Switchboard.java b/source/net/yacy/search/Switchboard.javaindex ebe9111e5..32d07a6f7 100644--- a/source/net/yacy/search/Switchboard.java+++ b/source/net/yacy/search/Switchboard.java@@ -208,6 +208,7 @@ import net.yacy.utils.UPnP;import net.yacy.utils.crypt;import com.google.common.io.Files;+import net.yacy.http.YaCyHttpServer;public final class Switchboard extends serverSwitch {@@ -1127,18 +1128,23 @@ public final class Switchboard extends serverSwitch {//plasmaSnippetCache.result scr = snippetCache.retrieve(new URL("http://www.heise.de/kiosk/archiv/ct/2003/4/20"), query, true, 260);this.trail = new LinkedBlockingQueue<String>();++ this.log.config("Finished Switchboard Initialization");+ }++ @Override+ public void setHttpServer(YaCyHttpServer server) {+ super.setHttpServer(server);// finally start jobs which shall be started after start-upnew Thread() {public void run() {- try {Thread.sleep(10000);} catch (final InterruptedException e) {} // we must wait until the httpd comes up+ try {Thread.sleep(10000);} catch (final InterruptedException e) {} // needs httpd upexecAPIActions(); // trigger startup actions}- }.start();-- this.log.config("Finished Switchboard Initialization");+ }.start();}-+public int getIndexingProcessorsQueueSize() {return this.indexingDocumentProcessor.getQueueSize()+ this.indexingCondensementProcessor.getQueueSize()