diff --git a/pom.xml b/pom.xml
index 5e94623..621808a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -433,7 +433,9 @@
52n-wps-algorithm
- org.n52.wps
+
+ org.n52.wps
+
@@ -691,6 +693,15 @@
jstl
1.2
+
+
+
+ ch.qos.logback
+ logback-classic
+ 1.1.11
+
+
+
com.thetransactioncompany
cors-filter
diff --git a/src/main/java/org/gcube/data/analysis/wps/WebProcessingService.java b/src/main/java/org/gcube/data/analysis/wps/WebProcessingService.java
index 36cbd40..ac8a093 100644
--- a/src/main/java/org/gcube/data/analysis/wps/WebProcessingService.java
+++ b/src/main/java/org/gcube/data/analysis/wps/WebProcessingService.java
@@ -92,8 +92,10 @@ public class WebProcessingService extends HttpServlet {
@Override
public void init() throws ServletException {
+ LOGGER.info("initialising WPS");
String dir = (String)context.application().getInitParameter(DIRECTORY_PARAM);
GcubeAlgorithmRepository.setUpdater(new AlgorithmUpdater(dir));
+ LOGGER.info("WPS initialised");
}
/**
diff --git a/src/main/java/org/gcube/data/analysis/wps/repository/AlgorithmUpdater.java b/src/main/java/org/gcube/data/analysis/wps/repository/AlgorithmUpdater.java
index 084e35b..d9c95f3 100644
--- a/src/main/java/org/gcube/data/analysis/wps/repository/AlgorithmUpdater.java
+++ b/src/main/java/org/gcube/data/analysis/wps/repository/AlgorithmUpdater.java
@@ -1,6 +1,7 @@
package org.gcube.data.analysis.wps.repository;
import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
+import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
import static java.nio.file.StandardWatchEventKinds.OVERFLOW;
import java.io.IOException;
@@ -66,7 +67,7 @@ public final class AlgorithmUpdater {
this.loader = loader;
//TODO: change with something from configuration
dir = Paths.get(algorithmDirectory);
- dir.register(watcher, ENTRY_CREATE);
+ dir.register(watcher, ENTRY_CREATE, ENTRY_MODIFY);
} catch (IOException e) {
throw new RuntimeException(e);
}
@@ -75,7 +76,7 @@ public final class AlgorithmUpdater {
@SuppressWarnings("unchecked")
public void run(){
for (;;) {
-
+ log.info("direcotry watcher is running");
// wait for key to be signaled
WatchKey key;
try {
@@ -87,7 +88,7 @@ public final class AlgorithmUpdater {
for (WatchEvent> event: key.pollEvents()) {
WatchEvent.Kind> kind = event.kind();
-
+ log.debug("new event thrown for directory watcher");
// This key is registered only
// for ENTRY_CREATE events,
// but an OVERFLOW event can