Skip to content

Commit

Permalink
Update comments from jglick in jenkinsci#2
Browse files Browse the repository at this point in the history
Tweak logging levels andload actions to force lazy loading.
  • Loading branch information
jtnord committed Jun 11, 2015
1 parent 11aaa0d commit 5a80937
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import hudson.model.Run;

import jenkins.model.Jenkins;
import jenkins.util.io.FileBoolean;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -49,7 +50,7 @@ public static void migrateIdStore() throws IOException {
}
File marker = new File(jenkins.getRootDir(), MARKER_FILE_NAME);
if (marker.exists()) {
LOGGER.log(Level.INFO, "Migration of IDStore already performed, so skipping migration.");
LOGGER.log(Level.FINE, "Migration of IDStore already performed, so skipping migration.");
return;
}
LOGGER.log(Level.INFO, "Starting migration of IDs");
Expand Down Expand Up @@ -80,7 +81,7 @@ static void performMigration(@Nonnull Jenkins jenkins) {
}

static void migrate(PersistenceRoot pr) {
LOGGER.log(Level.FINE, "migrating {0}" , pr.toString());
LOGGER.log(Level.FINE, "migrating {0}" , pr);
try {
String id = LegacyIdStore.getId(pr);
if (id != null) {
Expand Down Expand Up @@ -129,7 +130,7 @@ public void run() {
// touch something in the build just to force loading incase it gets more lazy in the future.
Object r = iterator.next();
if (r != null && r instanceof Run) {
((Run)r).getResult();
((Run)r).getAllActions();
}
migratedBuilds++;
}
Expand Down

0 comments on commit 5a80937

Please sign in to comment.