diff --git a/pom.xml b/pom.xml
index e9e2e5c..30e0e74 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
org.gcube.data.analysis
nlphub
- 0.0.1-SNAPSHOT
+ 1.0.0-SNAPSHOT
war
7.0.70
diff --git a/src/main/java/org/gcube/data/analysis/nlphub/NLPHub.java b/src/main/java/org/gcube/data/analysis/nlphub/NLPHub.java
index fc9a0d3..15d895f 100644
--- a/src/main/java/org/gcube/data/analysis/nlphub/NLPHub.java
+++ b/src/main/java/org/gcube/data/analysis/nlphub/NLPHub.java
@@ -148,10 +148,16 @@ public class NLPHub extends HttpServlet {
algs[i] = algs[i].trim();
}
+ String maxWaitingTime= getServletConfig().getInitParameter("MaxWaitingTime");
+ String sleepTime= getServletConfig().getInitParameter("SleepTime");
+ logger.debug("NLPHub: [maxWaitingTime="+maxWaitingTime+", sleepTime="+sleepTime+"]");
+
+ long maxWaitingTimeL=Long.parseLong(maxWaitingTime);
+ long sleepTimeL=Long.parseLong(sleepTime);
RunnerCommander commander = new RunnerCommander(dataMiner, algs,plink ,
annotations, token, response);
- commander.setSleepTime(100);
- commander.setMaxWaitingTime(90 * 1000);
+ commander.setSleepTime(sleepTimeL);
+ commander.setMaxWaitingTime(maxWaitingTimeL);
commander.startProcess();
} catch (Exception e) {
diff --git a/src/main/java/org/gcube/data/analysis/nlphub/nlp/NlpAsyncNerRunner.java b/src/main/java/org/gcube/data/analysis/nlphub/nlp/NlpAsyncNerRunner.java
index c328186..e7cbf09 100644
--- a/src/main/java/org/gcube/data/analysis/nlphub/nlp/NlpAsyncNerRunner.java
+++ b/src/main/java/org/gcube/data/analysis/nlphub/nlp/NlpAsyncNerRunner.java
@@ -41,7 +41,7 @@ public class NlpAsyncNerRunner extends AsyncHttpRequest {
dataMiner = Constants.DEFAULT_DATAMINER_URL;
// else
// this.dataMiner = "http://" + dataMiner;
-
+ logger.debug("NlpAsyncNerRunner: Create Excution Request");
logger.debug("NlpAsyncNerRunner: [identifier=" + identifier + ", httpMethod=" + httpMethod + ", annotations="
+ annotations + ", publicLink=" + publicLink + ", dataminer=" + dataMiner + "]");
@@ -102,7 +102,7 @@ public class NlpAsyncNerRunner extends AsyncHttpRequest {
serviceUrl.append(WPS_DESCRIBE_PROCESS_URL);
serviceUrl.append("&lang=en-US&Identifier=");
serviceUrl.append(identifier);
- logger.debug("BuildParameterString request URL: " + serviceUrl);
+ logger.debug("DescribeProcess Requested: " + serviceUrl);
serviceUrl.append("&gcube-token=");
serviceUrl.append(token);
diff --git a/src/main/java/org/gcube/data/analysis/nlphub/nlp/RunnerCommander.java b/src/main/java/org/gcube/data/analysis/nlphub/nlp/RunnerCommander.java
index 17dad97..7a46256 100644
--- a/src/main/java/org/gcube/data/analysis/nlphub/nlp/RunnerCommander.java
+++ b/src/main/java/org/gcube/data/analysis/nlphub/nlp/RunnerCommander.java
@@ -87,6 +87,7 @@ public class RunnerCommander extends Thread {
private void runAlgorithms() {
for (String id : identifiers) {
NlpAsyncNerRunner n = new NlpAsyncNerRunner(dataMiner, id, token, link, annotationList, null, this);
+ logger.debug("Run algorithm: "+id);
n.start();
}
}
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index b747681..7d720ec 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -4,6 +4,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
metadata-complete="true" version="3.0">
NLPHub
+
index.html
index.htm
@@ -15,6 +16,14 @@
NLPServlet
org.gcube.data.analysis.nlphub.NLPHub
+
+ MaxWaitingTime
+ 180000
+
+
+ SleepTime
+ 1000
+
NLPServlet