Skip to content

Commit

Permalink
Minor: improved messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lvca committed Dec 1, 2015
1 parent 922693d commit 64f1970
Showing 1 changed file with 12 additions and 6 deletions.
Expand Up @@ -51,11 +51,20 @@ protected void parseSetting(final String option, final List<String> items) {
}

public void run() {
long errors = 0;

if (removeBrokenLinks)
errors += removeBrokenLinks();

message("\nRepair database complete (" + errors + " errors)");
}

protected long removeBrokenLinks() {
long fixedLinks = 0l;
long modifiedDocuments = 0l;
long errors = 0l;

message("\n- Fixing dirty links...");
message("\n- Removing broken links...");
for (String clusterName : database.getClusterNames()) {
for (ORecord rec : database.browseCluster(clusterName)) {
try {
Expand Down Expand Up @@ -107,12 +116,9 @@ public void run() {
}
}
}
if (verbose)
message("\n");

message("Done! Fixed links: " + fixedLinks + ", modified documents: " + modifiedDocuments);

message("\nRepair database complete (" + errors + " errors)");
message("\n-- Done! Fixed links: " + fixedLinks + ", modified documents: " + modifiedDocuments);
return errors;
}

/**
Expand Down

0 comments on commit 64f1970

Please sign in to comment.