Skip to content

Commit

Permalink
0001491: Mark outgoing batches as OK during the start of an initial l…
Browse files Browse the repository at this point in the history
…oad can hanging until the config channel has been pulled
  • Loading branch information
chenson42 committed Dec 17, 2013
1 parent 1e16905 commit e4c35d2
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -87,7 +87,9 @@ public OutgoingBatchService(IParameterService parameterService,

public void markAllAsSentForNode(String nodeId, boolean includeConfigChannel) {
OutgoingBatches batches = null;
int configCount;
do {
configCount = 0;
batches = getOutgoingBatches(nodeId, true);
List<OutgoingBatch> list = batches.getBatches();
/*
Expand All @@ -100,14 +102,17 @@ public int compare(OutgoingBatch o1, OutgoingBatch o2) {
return -new Long(o1.getBatchId()).compareTo(o2.getBatchId());
}
});
for (OutgoingBatch outgoingBatch : batches.getBatches()) {

for (OutgoingBatch outgoingBatch : list) {
if (includeConfigChannel || !outgoingBatch.getChannelId().equals(Constants.CHANNEL_CONFIG)) {
outgoingBatch.setStatus(Status.OK);
outgoingBatch.setErrorFlag(false);
updateOutgoingBatch(outgoingBatch);
} else {
configCount++;
}
}
} while (batches.getBatches().size() > 0);
} while (batches.getBatches().size() > configCount);
}

public void updateAbandonedRoutingBatches() {
Expand Down

0 comments on commit e4c35d2

Please sign in to comment.