Skip to content

Commit

Permalink
modify ManagerProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
hmarkc committed Aug 30, 2021
1 parent 6a92668 commit db8ef16
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void jobComplete() {
if (currentProject != null) {
currentProject.setSuccessfullyCompleted();
currentProject.setFinished();
this.getHistory().add(currentProject);
// this.getHistory().add(currentProject);
setProcessedItems(getProcessedItems() + currentProject.getMax());
this.setElapsedTime(System.currentTimeMillis() - startTime);
}
Expand All @@ -45,14 +45,17 @@ public String getReasonsAsString() {
@Override
public void completedWithErrors(Exception e) {
super.completedWithErrors(e);
currentProject.completedWithErrors(e);
currentProject.setFinished();
this.getHistory().add(currentProject);
if (currentProject != null) {
currentProject.completedWithErrors(e);
currentProject.setFinished();
this.getHistory().add(currentProject);
}
}

public Progress beginCleanJob() {
incCurrent();
currentProject = new Progress("main clean");
currentProject = new Progress("clean all");
this.getHistory().add(currentProject);
return currentProject;
}

Expand All @@ -64,6 +67,7 @@ public Progress beginJob(Job<?, ?> project) {
builder.append(project.getName());
incCurrent();
currentProject = new Progress(builder.toString());
this.getHistory().add(currentProject);
return currentProject;
}

Expand Down

0 comments on commit db8ef16

Please sign in to comment.