Skip to content

Commit

Permalink
Added the usage of the HobbitConfiguraiton class instead of accessing…
Browse files Browse the repository at this point in the history
… system properties.
  • Loading branch information
MichaelRoeder committed Jan 5, 2024
1 parent 96ad3c8 commit 4199dd0
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@ protected ExperimentManager(PlatformController controller, HobbitConfiguration h
this.hobbitConfig = hobbitConfig;

try {
// TODO environment variable should have been used there
// TODO global static method in hobbit core for retrieving values like this
defaultMaxExecutionTime = Long
.parseLong(System.getProperty("MAX_EXECUTION_TIME", Long.toString(DEFAULT_MAX_EXECUTION_TIME)));
defaultMaxExecutionTime = hobbitConfig.getLong("MAX_EXECUTION_TIME", 1200000L, LOGGER);
} catch (Exception e) {
LOGGER.debug("Could not get execution time from env, using default value..");
}
Expand Down Expand Up @@ -329,7 +326,7 @@ protected static Map<String, Object> getHardwareConstraints(String serializedBen
return Collections.emptyMap();
}

private void createRabbitMQ(ExperimentConfiguration config) throws Exception {
protected void createRabbitMQ(ExperimentConfiguration config) throws Exception {
String rabbitMQAddress = hobbitConfig.getString(RABBIT_MQ_EXPERIMENTS_HOST_NAME_KEY, (String) null);
if (rabbitMQAddress == null) {
LOGGER.info("Starting new RabbitMQ for the experiment...");
Expand Down

0 comments on commit 4199dd0

Please sign in to comment.