Author: cwiklik
Date: Thu Jan 24 00:15:39 2019
New Revision: 1851988

URL: http://svn.apache.org/viewvc?rev=1851988&view=rev
Log:
UIMA-5960 reduce logging when out of tasks

Modified:
    
uima/uima-ducc/trunk/uima-ducc-pullservice/src/main/java/org/apache/uima/ducc/ps/service/transport/http/HttpServiceTransport.java

Modified: 
uima/uima-ducc/trunk/uima-ducc-pullservice/src/main/java/org/apache/uima/ducc/ps/service/transport/http/HttpServiceTransport.java
URL: 
http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-pullservice/src/main/java/org/apache/uima/ducc/ps/service/transport/http/HttpServiceTransport.java?rev=1851988&r1=1851987&r2=1851988&view=diff
==============================================================================
--- 
uima/uima-ducc/trunk/uima-ducc-pullservice/src/main/java/org/apache/uima/ducc/ps/service/transport/http/HttpServiceTransport.java
 (original)
+++ 
uima/uima-ducc/trunk/uima-ducc-pullservice/src/main/java/org/apache/uima/ducc/ps/service/transport/http/HttpServiceTransport.java
 Thu Jan 24 00:15:39 2019
@@ -252,6 +252,7 @@ public class HttpServiceTransport implem
                postMethod.setURI(new URI(currentTargetUrl.asString()));
                
                IMetaTaskTransaction metaTransaction=null;
+               boolean logOutOfTasks = true;
                while(running) {
                        HttpResponse response = httpClient.execute(postMethod);
                        if ( stopping ) {
@@ -269,7 +270,11 @@ public class HttpServiceTransport implem
                        if (transaction instanceof IMetaTaskTransaction) {
                                metaTransaction = (IMetaTaskTransaction) 
transaction;
                                if ( metaTransaction.getMetaTask() == null || 
metaTransaction.getMetaTask().getUserSpaceTask() == null) {
-                                       logger.log(Level.INFO,"Process 
Thread:"+Thread.currentThread().getId()+" - Driver is out of tasks - waiting 
for awhile ("+threadSleepTime+" ms) and will try again ");
+                                       if ( logOutOfTasks ) {
+                                               logger.log(Level.INFO,"Process 
Thread:"+Thread.currentThread().getId()+" - Driver is out of tasks - waiting 
for awhile ("+threadSleepTime+" ms) and will try again ");
+                                               logOutOfTasks = false;
+                                       }
+
                                        waitStrategy.handleNoTaskSupplied();
                                } else {
                                        // Got a task


Reply via email to