src/main/java/com/cloudbees/simplediskusage/QuickDiskUsageInitializer.java
@Initializer(after = InitMilestone.JOB_LOADED)
    public static void initialize() {
        // TODO switch to Jenkins.getActiveInstance() once 1.590+ is the baseline
        Jenkins jenkins = Jenkins.getInstance();
        if (jenkins == null) {
            throw new IllegalStateException("Jenkins has not been started, or was already shut down");
        }
        QuickDiskUsagePlugin plugin = jenkins.getPlugin(QuickDiskUsagePlugin.class);
        if (plugin == null) return;
        plugin.refreshData();
    }
/**
     * Let's update data after Jenkins is started and all jobs are loaded
     */
Let's update data after Jenkins is started and all jobs are loaded
Let ' s update data after Jenkins is started and all jobs are loaded
@Initializer(after = InitMilestone.JOB_LOADED)
    public static void initialize() {
        Jenkins jenkins = Jenkins.getInstance();
        if (jenkins == null) {
            throw new IllegalStateException("Jenkins has not been started, or was already shut down");
        }
        QuickDiskUsagePlugin plugin = jenkins.getPlugin(QuickDiskUsagePlugin.class);
        if (plugin == null) return;
        plugin.refreshData();
    }
@ Initializer ( after = InitMilestone . JOB_LOADED ) public static void initialize ( ) { Jenkins jenkins = Jenkins . getInstance ( ) ; if ( jenkins == null ) { throw new IllegalStateException ( "Jenkins has not been started, or was already shut down" ) ; } QuickDiskUsagePlugin plugin = jenkins . getPlugin ( QuickDiskUsagePlugin . class ) ; if ( plugin == null ) return ; plugin . refreshData ( ) ; }
Let's update data after Jenkins is started and all jobs are loaded
Let ' s update data after Jenkins is started and all jobs are loaded
// TODO switch to Jenkins.getActiveInstance() once 1.590+ is the baseline