JAL-3954 Do not retrieve alignment for failed jobs feature/JAL-3954-ebi-phmmer
authorMateusz Warowny <mmzwarowny@dundee.ac.uk>
Fri, 2 Jun 2023 13:08:42 +0000 (15:08 +0200)
committerMateusz Warowny <mmzwarowny@dundee.ac.uk>
Fri, 2 Jun 2023 13:16:47 +0000 (15:16 +0200)
src/jalview/ws2/actions/hmmer/PhmmerTask.java

index e077b61..8a7a826 100644 (file)
@@ -61,8 +61,11 @@ class PhmmerTask extends AbstractPollableTask<BaseJob, AlignmentI>
   protected AlignmentI done() throws IOException
   {
     var job = getSubJobs().get(0);
+    var status = job.getStatus();
     Console.info(String.format("phmmer finished job \"%s\" with status %s",
-            job.getServerJob().getJobId(), job.getStatus()));
+            job.getServerJob().getJobId(), status));
+    if (status != JobStatus.COMPLETED)
+      return null;
     var outputAlignment = client.getAlignment(job.getServerJob());
     var querySeq = job.getInputSequences().get(0).deriveSequence();
     {