servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lh...@apache.org
Subject svn commit: r704792 - /servicemix/scripts/builds/webapps/builds/status.jsp
Date Wed, 15 Oct 2008 06:46:28 GMT
Author: lhein
Date: Tue Oct 14 23:46:27 2008
New Revision: 704792

URL: http://svn.apache.org/viewvc?rev=704792&view=rev
Log:
reworked so that only UNKNOWN results are re-read after a specific time

Modified:
    servicemix/scripts/builds/webapps/builds/status.jsp

Modified: servicemix/scripts/builds/webapps/builds/status.jsp
URL: http://svn.apache.org/viewvc/servicemix/scripts/builds/webapps/builds/status.jsp?rev=704792&r1=704791&r2=704792&view=diff
==============================================================================
--- servicemix/scripts/builds/webapps/builds/status.jsp (original)
+++ servicemix/scripts/builds/webapps/builds/status.jsp Tue Oct 14 23:46:27 2008
@@ -141,9 +141,6 @@
       System.out.println("Processing: " + file);
       if (f.lastModified() + ACTIVITY_TIME_OUT >= System.currentTimeMillis()) {
       	  return "<td class='building' width='60%'><a href='logs/" + uri + "' class='building'>BUILDING</a></td>";
-      } else if (System.currentTimeMillis() - f.lastModified > RE_READ_TIMER) {
-          lastResultMap.remove(uri);
-          tsMap.remove(uri);
       }
 
       // speed up processing of page - if no change was made to the
@@ -167,10 +164,16 @@
           } else {
             return lastRes;
           }
-              
-          String updatedRes = lastRes.substring(0, lastRes.indexOf(searchTerm) + searchTerm.length());

-          updatedRes += durationText + "</a></td>";
-          return updatedRes;
+
+          if (searchTerm.equalsIgnoreCase("UNKNOWN") &&
+              System.currentTimeMillis() - f.lastModified > RE_READ_TIMER) {
+              lastResultMap.remove(uri);
+              tsMap.remove(uri);
+          } else {
+              String updatedRes = lastRes.substring(0, lastRes.indexOf(searchTerm) + searchTerm.length());

+              updatedRes += durationText + "</a></td>";
+              return updatedRes;
+          }
       }          
       
       reader = new BufferedReader(new FileReader(file));



Mime
View raw message