Skip to content
Permalink
Browse files
Merge pull request #2109 from jenkinsci/JENKINS-32190
Revert JENKINS-32190 fix
  • Loading branch information
kohsuke committed Mar 10, 2016
2 parents f56ace5 + b2013ed commit b67bb4c602192c39b28a58dba808f20ab4cb7e36
Showing with 3 additions and 7 deletions.
  1. +3 −7 core/src/main/java/hudson/model/UsageStatistics.java
@@ -31,7 +31,6 @@
import hudson.util.IOUtils;
import hudson.util.Secret;
import static hudson.util.TimeUnit2.DAYS;
import static hudson.init.InitMilestone.COMPLETED;

import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
@@ -96,12 +95,9 @@ public UsageStatistics(String keyImage) {
* Returns true if it's time for us to check for new version.
*/
public boolean isDue() {
final Jenkins j = Jenkins.getInstance();
// user opted out or Jenkins not fully initialized. no data collection.
if (j == null || j.isUsageStatisticsCollected() || DISABLED || COMPLETED.compareTo(j.getInitLevel()) > 0) {
return false;
}

// user opted out. no data collection.
if(!Jenkins.getInstance().isUsageStatisticsCollected() || DISABLED) return false;

long now = System.currentTimeMillis();
if(now - lastAttempt > DAY) {
lastAttempt = now;

0 comments on commit b67bb4c

Please sign in to comment.