Skip to content
Snippets Groups Projects

Remove Exareme algorithms that exist in the Exareme2 from the /algori…

2 files
+ 13
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -30,6 +30,7 @@ import java.io.IOException;
import java.net.ConnectException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import static eu.hbp.mip.utils.InputStreamConverter.convertInputStreamToString;
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
@@ -74,6 +75,14 @@ public class AlgorithmsAPI {
ArrayList<ExaremeAlgorithmDTO> galaxyAlgorithms = getGalaxyWorkflows(logger);
ArrayList<ExaremeAlgorithmDTO> algorithms = new ArrayList<>();
// Remove Exareme algorithms that exist in the Exareme2
if (mipengineAlgorithms != null && exaremeAlgorithms != null){
for (ExaremeAlgorithmDTO algorithm : mipengineAlgorithms) {
exaremeAlgorithms.removeIf(obj -> Objects.equals(obj.getName(), algorithm.getName()));
}
}
if (exaremeAlgorithms != null) {
algorithms.addAll(exaremeAlgorithms);
logger.LogUserAction("Loaded " + exaremeAlgorithms.size() + " exareme algorithms");
@@ -100,6 +109,8 @@ public class AlgorithmsAPI {
logger.LogUserAction("The disabled algorithms could not be loaded.");
}
// Remove any disabled algorithm
ArrayList<ExaremeAlgorithmDTO> allowedAlgorithms = new ArrayList<>();
for (ExaremeAlgorithmDTO algorithm : algorithms) {