Skip to content

Commit

Permalink
added a system property to disable workspace clean up
Browse files Browse the repository at this point in the history
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18963 71c3de6d-444a-0410-be80-ed276b4c234a
  • Loading branch information
kohsuke committed Jun 16, 2009
1 parent 07a17f1 commit ee5cba8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/main/java/hudson/model/WorkspaceCleanupThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ public static void invoke() {

protected void execute(TaskListener listener) throws InterruptedException, IOException {
try {
if(disabled) {
LOGGER.fine("Disabled. Skipping execution");
return;
}

this.listener = listener;

Hudson h = Hudson.getInstance();
Expand Down Expand Up @@ -165,4 +170,9 @@ public boolean accept(File f) {
private static final long DAY = 1000*60*60*24;

private static final Logger LOGGER = Logger.getLogger(WorkspaceCleanupThread.class.getName());

/**
* Can be used to disable workspace clean up.
*/
public static boolean disabled = Boolean.getBoolean(WorkspaceCleanupThread.class.getName()+".disabled");
}

0 comments on commit ee5cba8

Please sign in to comment.