From: jprocter Date: Fri, 27 May 2005 15:07:27 +0000 (+0000) Subject: added proper state check for failedJob flag. X-Git-Tag: Release_2_0~143 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f3e28632eb4f1bfd2058d6e1b1c476296ca1d5e1;hp=6b908c927897408bf9c522f2d87a4cc98bed2325;p=jalview.git added proper state check for failedJob flag. --- diff --git a/src/jalview/ws/MsaWSClient.java b/src/jalview/ws/MsaWSClient.java index 4e358a0..23c4ed4 100755 --- a/src/jalview/ws/MsaWSClient.java +++ b/src/jalview/ws/MsaWSClient.java @@ -174,11 +174,14 @@ public class MsaWSClient } else { - wsInfo.setProgressText(OutputHeader + "\n" + result.getStatus()); + if (result.getStatus()!=null) + wsInfo.setProgressText(OutputHeader + "\n" + result.getStatus()); if (! (result.isJobFailed() || result.isServerError())) { Thread.sleep(5000); // System.out.println("I'm alive "+seqid+" "+jobid); + } else { + break; } } } @@ -189,12 +192,16 @@ public class MsaWSClient ex.printStackTrace(); } } - - if (! (result!=null && (result.isJobFailed() || result.isServerError()))) - wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_OK); - else + if (allowedServerExceptions==0) { wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR); - } + } else { + if (! (result!=null && (result.isJobFailed() || result.isServerError()))) + wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_OK); + else { + if (result.isJobFailed() + + wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR); + } void StartJob() {