- 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
## [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

View File

@ -101,12 +101,12 @@
<dependency>
<groupId>org.gcube.dataanalysis</groupId>
<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>
<groupId>org.gcube.dataanalysis</groupId>
<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>
<exclusion>
<artifactId>log4j</artifactId>
@ -117,12 +117,12 @@
<dependency>
<groupId>org.gcube.dataanalysis</groupId>
<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>
<groupId>org.gcube.dataanalysis</groupId>
<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>
<exclusion>
<groupId>org.glassfish.jersey.core</groupId>

View File

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

View File

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