Skip to content

Commit

Permalink
Add flag to enable semweb service
Browse files Browse the repository at this point in the history
Change-Id: I0db1315bd3eb9a5e748ec8b5ecf9c333d8756a70
  • Loading branch information
ewpatton committed May 9, 2024
1 parent 2e6ea04 commit 80d3be6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package com.google.appinventor.server;

import com.google.appinventor.server.flags.Flag;
import com.google.appinventor.shared.rpc.semweb.SemWebConstants;
import com.google.appinventor.shared.rpc.semweb.SemWebService;
import com.hp.hpl.jena.ontology.OntClass;
Expand Down Expand Up @@ -51,6 +52,9 @@ public class SemWebServiceImpl extends OdeRemoteServiceServlet implements

private static final String INDEX_TIME = "Lucene initialization completed in %d ms.";

private static final boolean ENABLED = Flag.createFlag("semweb.enable", "true").get()
.equals("true");

/**
* Stores all ontology information.
*/
Expand Down Expand Up @@ -136,7 +140,9 @@ public void run() {
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
new Thread(new OntologyLoader()).start();
if (ENABLED) {
new Thread(new OntologyLoader()).start();
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions appinventor/appengine/war/WEB-INF/appengine-web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
<!-- So the calls to the buildserver can re-use connections -->
<property name="http.keepAlive" value="true" />
<property name="http.maxConnections" value="5" />
<property name="semweb.enable" value="true" />

</system-properties>
</appengine-web-app>

0 comments on commit 80d3be6

Please sign in to comment.