Package com.cloudbees.jenkins
Class Cleaner
- java.lang.Object
-
- java.util.TimerTask
-
- hudson.triggers.SafeTimerTask
-
- hudson.model.PeriodicWork
-
- com.cloudbees.jenkins.Cleaner
-
- All Implemented Interfaces:
ExtensionPoint
,Runnable
@Extension public class Cleaner extends PeriodicWork
Removes post-commit hooks from repositories that we no longer care. This runs periodically in a delayed fashion to avoid hitting GitHub too often.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.triggers.SafeTimerTask
SafeTimerTask.ExceptionRunnable
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.PeriodicWork
DAY, HOUR, logger, MIN
-
-
Constructor Summary
Constructors Constructor Description Cleaner()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doRun()
Each run this work fetches alive repo names (which has trigger for it) then if names queue is not empty (any job was reconfigured with GH trigger change), next name passed toWebhookManager
with list of active names to check and unregister old hooksstatic Cleaner
get()
long
getRecurrencePeriod()
-
Methods inherited from class hudson.model.PeriodicWork
all, getInitialDelay, init
-
Methods inherited from class hudson.triggers.SafeTimerTask
getLogsRoot, of, run
-
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
-
-
-
Method Detail
-
getRecurrencePeriod
public long getRecurrencePeriod()
- Specified by:
getRecurrencePeriod
in classPeriodicWork
-
doRun
protected void doRun() throws Exception
Each run this work fetches alive repo names (which has trigger for it) then if names queue is not empty (any job was reconfigured with GH trigger change), next name passed toWebhookManager
with list of active names to check and unregister old hooks- Specified by:
doRun
in classSafeTimerTask
- Throws:
Exception
-
get
public static Cleaner get()
-
-