Class 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.
Kohsuke Kawaguchi
  • Constructor Details

    • Cleaner

      public Cleaner()
  • Method Details

    • getRecurrencePeriod

      public long getRecurrencePeriod()
      Specified by:
      getRecurrencePeriod in class PeriodicWork
    • 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 to WebhookManager with list of active names to check and unregister old hooks
      Specified by:
      doRun in class SafeTimerTask
    • get

      public static Cleaner get()