Skip to content
Snippets Groups Projects
Commit ed359100 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Bugfix in logic regarding counting/detecting failed model runs

parent 533f45f6
Branches
No related tags found
No related merge requests found
......@@ -115,20 +115,25 @@ public class RunAllForecastConfigurationsTask extends VipsLogicTask{
ex.getMessage(),
SchedulingUtil.MESSAGE_STATUS_DANGER)
);
//System.out.println("Error caught");
continue;
//System.out.println("########################### Error caught: " + errorMessage);
//System.out.println("numberOfCompletedForecastConfigurations=" + numberOfCompletedForecastConfigurations);
//System.out.println("totalNumberofForecastConfigurations=" + totalNumberofForecastConfigurations);
//continue;
}
}
if(totalNumberofForecastConfigurations > 0)
{
noForecastConfigurationsFound = false;
double completeness = (double) numberOfCompletedForecastConfigurations/totalNumberofForecastConfigurations;
tec.setCompleteness(completeness);
}
else
{
noForecastConfigurationsFound = true;
//System.out.println("noForecastConfigurationsFound == true!!");
}
//System.out.println("Current completeness=" + tec.getTaskExecutor().getCompleteness());
}
}
......@@ -138,9 +143,12 @@ public class RunAllForecastConfigurationsTask extends VipsLogicTask{
tec.setCompleteness(1.0);
tec.setStatusMessage("No current forecast configurations were found");
}
//System.out.println("Total completeness=" + tec.getTaskExecutor().getCompleteness());
if(tec.getTaskExecutor().getCompleteness() != 1.0)
{
//System.out.println("Error detected");
//System.out.println("Error detected, RuntimeException thrown just after this");
tec.setStatusMessage(errorMessage.toString());
throw new RuntimeException();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment