Merge branch 'develop' into update_212_Dec_merge_with_21125_chamges
[jalview.git] / src / jalview / ws / AWSThread.java
index 5748414..021382c 100644 (file)
@@ -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