Skip to content

Commit

Permalink
correct bug to find which engiens have not been installed
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Nov 6, 2024
1 parent 2a6d432 commit 0999146
Showing 1 changed file with 12 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
import java.util.Map.Entry;
import java.util.stream.Collectors;

import org.omg.IOP.RMICustomMaxStreamFormat;

import io.bioimage.modelrunner.bioimageio.BioimageioRepo;
import io.bioimage.modelrunner.bioimageio.description.ModelDescriptor;
import io.bioimage.modelrunner.bioimageio.description.ModelDescriptorFactory;
Expand Down Expand Up @@ -563,29 +565,22 @@ private void installMissingBasicEngines() {
} catch (InterruptedException e) {
return;
}
/**
missingEngineFolders = missingEngineFolders.entrySet().stream()
.filter(v -> {
try {
return !installEngineByCompleteName(v.getValue(), consumersMap.get(v.getValue()));
} catch (IOException e) {
return true;
} catch (InterruptedException e) {
return true;
}
})
.collect(Collectors.toMap(v -> v.getKey(), v -> v.getValue(),
(u, v) -> u, LinkedHashMap::new));
*/
List<Boolean> installedArr = new ArrayList<Boolean>();
for (Entry<String, String> v : missingEngineFolders.entrySet()) {
boolean installed = false;
try {
boolean installed = installEngineByCompleteName(v.getValue(), consumersMap.get(v.getValue()));
if (installed)
missingEngineFolders.remove(v.getKey());
installed = installEngineByCompleteName(v.getValue(), consumersMap.get(v.getValue()));
} catch (IOException e) {
} catch (InterruptedException e) {
return;
}
installedArr.add(installed);
}
List<String> keys = missingEngineFolders.keySet().stream().collect(Collectors.toList());
for (int i = 0; i < installedArr.size(); i ++) {
if (!installedArr.get(i))
continue;
missingEngineFolders.remove(missingEngineFolders.get(keys.get(i)));
}
}

Expand Down

0 comments on commit 0999146

Please sign in to comment.