Skip to content

Commit

Permalink
minor change and add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Nov 19, 2024
1 parent 3c638eb commit 0d75458
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ public static String downloadModel(ModelDescriptor descriptor, String modelsDire
mdt.track();
} catch (IOException | InterruptedException e) {
e.printStackTrace();
} catch (NumberFormatException ex) {
}
});
trackerThread.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
import javax.net.ssl.X509TrustManager;

/**
* TODO get rid of consumer here and at DownloadTracker (trackstring)
*
* Class to manage the downloading of models from the BioImage.io
* @author Carlos Garcia Lopez de Haro
*
Expand Down Expand Up @@ -492,7 +494,7 @@ public void downloadModel() throws IOException, InterruptedException {
throw new IOException("The provided directory where the model is going to "
+ "be downloaded does not exist and cannot be created ->" + modelsDir);
for (int i = 0; i < getListOfLinks().size(); i ++) {
if (Thread.currentThread().isInterrupted() || !this.parentThread.isAlive()) {
if (!Thread.currentThread().isAlive() || !this.parentThread.isAlive()) {
throw new InterruptedException("Interrupted before downloading the remaining files: "
+ Arrays.toString(IntStream.range(i, getListOfLinks().size())
.mapToObj(j -> getListOfLinks().get(j)).toArray()));
Expand Down

0 comments on commit 0d75458

Please sign in to comment.