Skip to content

Commit

Permalink
0002799: Adjust unrouted data count to not include gaps
Browse files Browse the repository at this point in the history
  • Loading branch information
jumpmind-josh committed Sep 15, 2016
1 parent a7704ba commit 0b241e6
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -1086,11 +1086,7 @@ public long getUnroutedDataCount() {
long maxDataIdAlreadyRouted = sqlTemplate
.queryForLong(getSql("selectLastDataIdRoutedUsingDataGapSql"));
long leftToRoute = engine.getDataService().findMaxDataId() - maxDataIdAlreadyRouted;
List<DataGap> gaps = engine.getDataService().findDataGapsByStatus(DataGap.Status.GP);
for (int i = 0; i < gaps.size()-2; i++) {
DataGap gap = gaps.get(i);
leftToRoute += (gap.getEndId() - gap.getStartId());
}

if (leftToRoute > 0) {
return leftToRoute;
} else {
Expand Down

0 comments on commit 0b241e6

Please sign in to comment.