Class OrphanedInstanceReaper
java.lang.Object
java.util.TimerTask
hudson.triggers.SafeTimerTask
hudson.model.PeriodicWork
hudson.model.AsyncPeriodicWork
io.jenkins.plugins.namespacecloud.OrphanedInstanceReaper
- All Implemented Interfaces:
ExtensionPoint,Runnable
Destroys Namespace instances this controller created but no longer tracks.
An instance is orphaned when its Jenkins node is gone — the controller crashed between creating the instance and registering the node, an admin deleted the node by hand, or a config change dropped the cloud. Namespace's per-instance deadline eventually reclaims these anyway, but that can be hours of paid compute; this closes the gap to minutes.
Only instances labelled with NamespaceCloud.LABEL_CLOUD matching a
cloud defined on this controller are considered, so two Jenkins
instances sharing one Namespace workspace never reap each other's agents.
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.triggers.SafeTimerTask
SafeTimerTask.ExceptionRunnableNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class hudson.model.AsyncPeriodicWork
nameFields inherited from class hudson.model.PeriodicWork
DAY, HOUR, logger, MIN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidexecute(TaskListener listener) protected LevellongMethods inherited from class hudson.model.AsyncPeriodicWork
createListener, doRun, getErrorLoggingLevel, getLogFile, getSlowLoggingLevel, queueIfAlreadyRunningMethods inherited from class hudson.model.PeriodicWork
all, getInitialDelay, initMethods inherited from class hudson.triggers.SafeTimerTask
getLogsRoot, of, runMethods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Constructor Details
-
OrphanedInstanceReaper
public OrphanedInstanceReaper()
-
-
Method Details
-
getRecurrencePeriod
public long getRecurrencePeriod()- Specified by:
getRecurrencePeriodin classPeriodicWork
-
getNormalLoggingLevel
- Overrides:
getNormalLoggingLevelin classAsyncPeriodicWork
-
execute
- Specified by:
executein classAsyncPeriodicWork
-