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.
Author:
Kohsuke Kawaguchi
  • Constructor Details Link icon

    • Cleaner Link icon

      public Cleaner()
  • Method Details Link icon

    • getRecurrencePeriod Link icon

      public long getRecurrencePeriod()
      Specified by:
      getRecurrencePeriod in class PeriodicWork
    • doRun Link icon

      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
      Throws:
      Exception
    • get Link icon

      public static Cleaner get()