git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/wps@151103 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
8df850f693
commit
44d66fdbb4
|
@ -49,6 +49,10 @@ public final class AlgorithmUpdater {
|
||||||
watcherThread.start();
|
watcherThread.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void init(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private class WatcherThread extends Thread {
|
private class WatcherThread extends Thread {
|
||||||
|
|
||||||
private WatchService watcher;
|
private WatchService watcher;
|
||||||
|
@ -77,6 +81,7 @@ public final class AlgorithmUpdater {
|
||||||
try {
|
try {
|
||||||
key = watcher.take();
|
key = watcher.take();
|
||||||
} catch (InterruptedException x) {
|
} catch (InterruptedException x) {
|
||||||
|
log.error("DIRECTORY WATCHER IS INTERRUPTED",x);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +101,9 @@ public final class AlgorithmUpdater {
|
||||||
// context of the event.
|
// context of the event.
|
||||||
WatchEvent<Path> ev = (WatchEvent<Path>)event;
|
WatchEvent<Path> ev = (WatchEvent<Path>)event;
|
||||||
Path filename = ev.context();
|
Path filename = ev.context();
|
||||||
|
|
||||||
if (filename.toString().endsWith(".jar")){
|
if (filename.toString().endsWith(".jar")){
|
||||||
|
log.debug("found filename {} ",filename.toString());
|
||||||
try{
|
try{
|
||||||
final Class<URLClassLoader> sysclass = URLClassLoader.class;
|
final Class<URLClassLoader> sysclass = URLClassLoader.class;
|
||||||
// TODO some kind of a hack. Need to invent better solution.
|
// TODO some kind of a hack. Need to invent better solution.
|
||||||
|
|
|
@ -85,8 +85,8 @@ public class GcubeAlgorithmRepository implements IAlgorithmRepository {
|
||||||
|
|
||||||
private static synchronized void updateRepository(){
|
private static synchronized void updateRepository(){
|
||||||
if (reflection==null || updater.mustUpdate()){
|
if (reflection==null || updater.mustUpdate()){
|
||||||
|
log.info("updating repository ({}) ",updater.mustUpdate());
|
||||||
updater.reset();
|
updater.reset();
|
||||||
log.info("update time passed, updating repository");
|
|
||||||
ConfigurationBuilder confBuilder = new ConfigurationBuilder()
|
ConfigurationBuilder confBuilder = new ConfigurationBuilder()
|
||||||
.filterInputsBy(new FilterBuilder().include(FilterBuilder.prefix(PACKAGE_TO_FIND)))
|
.filterInputsBy(new FilterBuilder().include(FilterBuilder.prefix(PACKAGE_TO_FIND)))
|
||||||
.setUrls(((URLClassLoader)Thread.currentThread().getContextClassLoader()).getURLs());
|
.setUrls(((URLClassLoader)Thread.currentThread().getContextClassLoader()).getURLs());
|
||||||
|
|
|
@ -25,7 +25,7 @@ no. 654119), SoBigData (grant no. 654024);
|
||||||
Version
|
Version
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
|
|
||||||
1.0.0-SNAPSHOT (2017-07-12)
|
1.0.0-SNAPSHOT (2017-07-17)
|
||||||
|
|
||||||
Please see the file named "changelog.xml" in this directory for the release notes.
|
Please see the file named "changelog.xml" in this directory for the release notes.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue