- EnviromentalVariableManager reverted

- import range changed for ecological-engine libraries
This commit is contained in:
lucio.lelii 2020-11-30 17:39:25 +01:00
parent 279535c13a
commit d9a6eb21be
4 changed files with 30 additions and 42 deletions

View File

@ -1,9 +1,9 @@
# Changelog # Changelog
## [v1.76.0] - 2020-11-20 ## [v1.7.0-SNAPSHOT] - 2020-11-20
- Config path passed as parameter - import range modified to resolve old repositories invalid url
## [v1.6.0] - 2020-05-12 ## [v1.6.0] - 2020-05-12

View File

@ -101,12 +101,12 @@
<dependency> <dependency>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
<artifactId>ecological-engine-wps-extension</artifactId> <artifactId>ecological-engine-wps-extension</artifactId>
<version>[1.0.4,2.0.0-SNAPSHOT)</version> <version>[1.0.5,2.0.0-SNAPSHOT)</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
<artifactId>ecological-engine-geospatial-extensions</artifactId> <artifactId>ecological-engine-geospatial-extensions</artifactId>
<version>[1.5.0,2.0.0-SNAPSHOT)</version> <version>[1.5.2,2.0.0-SNAPSHOT)</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
@ -117,12 +117,12 @@
<dependency> <dependency>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
<artifactId>ecological-engine-external-algorithms</artifactId> <artifactId>ecological-engine-external-algorithms</artifactId>
<version>[1.2.0,2.0.0-SNAPSHOT)</version> <version>[1.2.1,2.0.0-SNAPSHOT)</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.gcube.dataanalysis</groupId> <groupId>org.gcube.dataanalysis</groupId>
<artifactId>ecological-engine-smart-executor</artifactId> <artifactId>ecological-engine-smart-executor</artifactId>
<version>[1.6.2,2.0.0-SNAPSHOT)</version> <version>[1.6.4,2.0.0-SNAPSHOT)</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.glassfish.jersey.core</groupId> <groupId>org.glassfish.jersey.core</groupId>

View File

@ -28,7 +28,6 @@ public class ConfigurationManager {
private static Integer maxComputations = null; private static Integer maxComputations = null;
private static Boolean useStorage = null; private static Boolean useStorage = null;
static boolean simulationMode = false; static boolean simulationMode = false;
private String baseConfigPath;
EnvironmentVariableManager env = null; EnvironmentVariableManager env = null;
@ -86,7 +85,6 @@ public class ConfigurationManager {
maxComputations = env.getMaxComputation(); maxComputations = env.getMaxComputation();
useStorage = env.isSaveOnStorage(); useStorage = env.isSaveOnStorage();
simulationMode = env.isSimulationMode(); simulationMode = env.isSimulationMode();
baseConfigPath = env.getConfigPath();
} }
} }
@ -104,16 +102,12 @@ public class ConfigurationManager {
config.setAlgorithmClassLoader(Thread.currentThread().getContextClassLoader()); config.setAlgorithmClassLoader(Thread.currentThread().getContextClassLoader());
String webperspath = WPSConfig.getConfigDir() + "../persistence/"; String webperspath = WPSConfig.getConfigDir() + "../persistence/";
// selecting persistence path // selecting persistence path
// String persistencePath = File.createTempFile("wpsstatcheck", ".sm").getParent() + "/../cfg/"; String persistencePath = WPSConfig.getConfigDir() + "../ecocfg/";
String configPath = persistencePath;
//String webperspath = baseConfigPath + "/persistence/"; if (!new File(configPath).isDirectory()) {
//String persistencePath = baseConfigPath; WPSConfig.getConfigDir() + "../ecocfg/";
String configPath = baseConfigPath + "/ecocfg/"; //persistencePath;
/*if (!new File(configPath).isDirectory()) {
configPath = "./cfg/"; configPath = "./cfg/";
persistencePath = "./"; persistencePath = "./";
}*/ }
logger.debug("Taking configuration from {}", configPath); logger.debug("Taking configuration from {}", configPath);
//+ " and persistence in " + persistencePath); //+ " and persistence in " + persistencePath);
// setting configuration and logger // setting configuration and logger

View File

@ -4,13 +4,12 @@ import java.util.List;
public class EnvironmentVariableManager { public class EnvironmentVariableManager {
public EnvironmentVariableManager(int maxComputation, boolean saveOnStorage, boolean simulationMode, List<String> shubUsersExcluded, String configPath ) { public EnvironmentVariableManager(int maxComputation, boolean saveOnStorage, boolean simulationMode, List<String> shubUsersExcluded) {
super(); super();
this.maxComputation = maxComputation; this.maxComputation = maxComputation;
this.saveOnStorage = saveOnStorage; this.saveOnStorage = saveOnStorage;
this.simulationMode = simulationMode; this.simulationMode = simulationMode;
this.shubUsersExcluded = shubUsersExcluded; this.shubUsersExcluded = shubUsersExcluded;
this.configPath = configPath;
} }
private int maxComputation; private int maxComputation;
@ -22,8 +21,6 @@ public class EnvironmentVariableManager {
//filled: users reported will not write on Shub //filled: users reported will not write on Shub
private List<String> shubUsersExcluded; private List<String> shubUsersExcluded;
private String configPath;
public int getMaxComputation() { public int getMaxComputation() {
return maxComputation; return maxComputation;
} }
@ -38,7 +35,4 @@ public class EnvironmentVariableManager {
return shubUsersExcluded; return shubUsersExcluded;
} }
public String getConfigPath() {
return configPath;
}
} }