提交 81189a41 编写于 作者: K kohsuke

added log messages.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5872 71c3de6d-444a-0410-be80-ed276b4c234a
上级 934b2b9a
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册