From 81189a41925dc020fc2995d795f156df99b2ecb5 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Tue, 13 Nov 2007 16:56:19 +0000 Subject: [PATCH] added log messages. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5872 71c3de6d-444a-0410-be80-ed276b4c234a --- .../main/java/hudson/model/WorkspaceCleanupThread.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/hudson/model/WorkspaceCleanupThread.java b/core/src/main/java/hudson/model/WorkspaceCleanupThread.java index 7d45c5c1f3..f75ef0d0df 100644 --- a/core/src/main/java/hudson/model/WorkspaceCleanupThread.java +++ b/core/src/main/java/hudson/model/WorkspaceCleanupThread.java @@ -71,9 +71,11 @@ public class WorkspaceCleanupThread extends PeriodicWork { // TODO: the use of remoting is not optimal. // One remoting can execute "exists", "lastModified", and "delete" all at once. TopLevelItem item = Hudson.getInstance().getItem(jobName); - if(item==null) + if(item==null) { // no such project anymore + LOGGER.fine("Directory "+dir+" is not owned by any project"); return true; + } if(!dir.exists()) return false; @@ -81,9 +83,11 @@ public class WorkspaceCleanupThread extends PeriodicWork { if (item instanceof AbstractProject) { AbstractProject p = (AbstractProject) item; Node lb = p.getLastBuiltOn(); - if(lb!=null && lb.equals(n)) + if(lb!=null && lb.equals(n)) { // this is the active workspace. keep it. + LOGGER.fine("Directory "+dir+" is the last workspace for "+p); return false; + } } // if older than a month, delete -- GitLab