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
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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
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
-
Constructor Details
-
Cleaner
public Cleaner()
-
-
Method Details
-
getRecurrencePeriod
public long getRecurrencePeriod()- Specified by:
getRecurrencePeriod
in classPeriodicWork
-
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 hooks- Specified by:
doRun
in classSafeTimerTask
- Throws:
Exception
-
get
-