@Extension public class WorkspaceCleanupThread extends AsyncPeriodicWork
ExtensionPoint.LegacyInstancesAreScopedToHudson| Modifier and Type | Field and Description |
|---|---|
static boolean |
disabled
Can be used to disable workspace clean up.
|
static int |
recurrencePeriodHours
How often the clean up should run.
|
static int |
retainForDays
Number of days workspaces should be retained.
|
nameDAY, HOUR, logger, MIN| Constructor and Description |
|---|
WorkspaceCleanupThread() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
execute(TaskListener listener)
Executes the task.
|
long |
getRecurrencePeriod()
Gets the number of milliseconds between successive executions.
|
static void |
invoke() |
createListener, doRun, getErrorLoggingLevel, getLogFile, getNormalLoggingLevel, getSlowLoggingLevelall, getInitialDelay, initruncancel, scheduledExecutionTimepublic static boolean disabled
public static final int recurrencePeriodHours
public static int retainForDays
public long getRecurrencePeriod()
PeriodicWorkHudson calls this method once to set up a recurring timer, instead of calling this each time after the previous execution completed. So this class cannot be used to implement a non-regular recurring timer.
IOW, the method should always return the same value.
getRecurrencePeriod in class PeriodicWorkpublic static void invoke()
protected void execute(TaskListener listener) throws InterruptedException, IOException
AsyncPeriodicWorkexecute in class AsyncPeriodicWorklistener - Output sent will be reported to the users. (this work is TBD.)InterruptedException - The caller will record the exception and moves on.IOException - The caller will record the exception and moves on.Copyright © 2019. All rights reserved.