You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by lh...@apache.org on 2008/10/15 08:46:28 UTC
svn commit: r704792 - /servicemix/scripts/builds/webapps/builds/status.jsp
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));