X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2FAWSThread.java;fp=src%2Fjalview%2Fws%2FAWSThread.java;h=021382ce607cca961186812f53a2e0eee2e4b992;hb=d043ce47fc710d3eb2629ba926a8a7417bd67d8c;hp=5748414ab2e8438a114ba0d9e55dbeede4a56021;hpb=49db0dff1da16c3355b43a41498c1fc93ef47e91;p=jalview.git diff --git a/src/jalview/ws/AWSThread.java b/src/jalview/ws/AWSThread.java index 5748414a..021382c 100644 --- a/src/jalview/ws/AWSThread.java +++ b/src/jalview/ws/AWSThread.java @@ -20,7 +20,7 @@ */ package jalview.ws; -import jalview.bin.Cache; +import jalview.bin.Console; import jalview.datamodel.AlignedCodonFrame; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; @@ -110,7 +110,7 @@ public abstract class AWSThread if (jobs == null) { jobComplete = true; - Cache.log.debug( + Console.debug( "WebServiceJob poll loop finished with no jobs created."); wsInfo.setStatus(WebserviceInfo.STATE_STOPPED_ERROR); wsInfo.appendProgressText( @@ -124,6 +124,7 @@ public abstract class AWSThread @Override public void actionPerformed(ActionEvent e) { + JobStateSummary jstate = new JobStateSummary(); for (final AWsJob job : jobs) { @@ -131,11 +132,11 @@ public abstract class AWSThread { StartJob(job); } - Cache.log.debug(format( + Console.debug(format( "Job %s is %ssubmitted", job, job.submitted ? "" : "not ")); if (job.submitted && !job.subjobComplete) { - Cache.log.debug(format( + Console.debug(format( "Polling Job %s Result state was:%s(ServerError=%b)", job, job.getState(), job.isServerError())); try @@ -144,7 +145,7 @@ public abstract class AWSThread if (!job.hasResponse()) throw new Exception("Timed out when communicating with server. Try again later."); else - Cache.log.debug(format("Job %s Result state:%s(ServerError=%b)", + Console.debug(format("Job %s Result state:%s(ServerError=%b)", job, job.getState(), job.isServerError())); } catch (Exception exc) { @@ -153,7 +154,7 @@ public abstract class AWSThread .formatMessage("info.server_exception", WebServiceName, exc.getMessage())); // always output the exception's stack trace to the log - Cache.log.warn(format("%s job(%s) Server exception.", + Console.warn(format("%s job(%s) Server exception.", WebServiceName, job.jobnum)); exc.printStackTrace(); @@ -163,7 +164,7 @@ public abstract class AWSThread } else { - Cache.log.warn(format("Dropping job %s %s", job, job.jobId)); + Console.warn(format("Dropping job %s %s", job, job.jobId)); job.subjobComplete = true; wsInfo.setStatus(job.jobnum, WebserviceInfo.STATE_STOPPED_SERVERERROR); } @@ -173,7 +174,7 @@ public abstract class AWSThread job.subjobComplete = true; job.clearResponse(); wsInfo.setStatus(job.jobnum, WebserviceInfo.STATE_STOPPED_ERROR); - Cache.log.error(format("Out of memory when retrieving Job %s id:%s/%s", + Console.error(format("Out of memory when retrieving Job %s id:%s/%s", job, WsUrl, job.jobId), oomerror); new jalview.gui.OOMWarning("retrieving result for " + WebServiceName, oomerror); System.gc(); @@ -223,6 +224,7 @@ public abstract class AWSThread } } } + public void interrupt() { @@ -279,6 +281,7 @@ public abstract class AWSThread } } + /** * * @return gap character to use for any alignment generation