From 56b24dca176430d663dfa14a3b778a11fa9c8d1b Mon Sep 17 00:00:00 2001 From: Tom Copeland Date: Fri, 28 Feb 2003 16:57:33 +0000 Subject: [PATCH] Added more time info git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1495 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd-web/src/pmd.rb | 4 ++++ pmd-web/src/processor.rb | 6 ++++-- pmd-web/src/webpmd.pl | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pmd-web/src/pmd.rb b/pmd-web/src/pmd.rb index 30c447f78c..32548d4167 100644 --- a/pmd-web/src/pmd.rb +++ b/pmd-web/src/pmd.rb @@ -45,6 +45,10 @@ class Job } t.join end + + def checkOutOK + return File.exists?(@sourceDirectory) + end def run_pmd cmd="java -jar pmd-1.03.jar \"#{@sourceDirectory}\" html rulesets/unusedcode.xml > \"#{reportFile()}\"" diff --git a/pmd-web/src/processor.rb b/pmd-web/src/processor.rb index 55760f7b29..c34e0d3b0c 100644 --- a/pmd-web/src/processor.rb +++ b/pmd-web/src/processor.rb @@ -17,8 +17,10 @@ jobsDir.each { |candidate| #puts "Processing #{job}" job.clear job.checkout_code - job.run_pmd - job.clear + if (job.checkOutOK) + job.run_pmd + job.clear + end end rescue puts "Exiting with error: #{$!}" diff --git a/pmd-web/src/webpmd.pl b/pmd-web/src/webpmd.pl index f7059916ba..295f7a9fa8 100644 --- a/pmd-web/src/webpmd.pl +++ b/pmd-web/src/webpmd.pl @@ -27,7 +27,7 @@ sub default() { my $lastruntime=; close(FILE); print br(); - print "The last run finished at ", $lastruntime; + print "This report is run 10 minutes past the hour at midnight, 3, 6, 9, 12, 15, 18, and 21 hours. The last run finished at ", $lastruntime; print hr(); if (param("unixname")) {