Skip to content

Commit

Permalink
[Improve] get latest checkpoint bug fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfboys committed Oct 1, 2024
1 parent d88be6e commit 9d5263d
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ public String getPath() {
@Getter
@Setter
public static class Latest implements Serializable {

private CheckPoint completed;
private CheckPoint savepoint;
private CheckPoint failed;

@JsonIgnore
public List<CheckPoint> getLatestCheckpoint() {
Expand All @@ -108,6 +110,15 @@ public List<CheckPoint> getLatestCheckpoint() {
if (savepoint != null) {
checkPoints.add(savepoint);
}
if (failed != null) {
if (completed == null) {
checkPoints.add(failed);
} else {
if (failed.getId() > completed.getId()) {
checkPoints.add(failed);
}
}
}
return checkPoints;
}
}
Expand Down

0 comments on commit 9d5263d

Please sign in to comment.