Skip to content

Commit

Permalink
SLING-12289 - Only store status if it does not yet exist (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
cschneider committed Apr 16, 2024
1 parent a2c3f9c commit a06c5c8
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ public void close() throws IOException {

private void handle(MessageInfo info, PackageStatusMessage pkgStatusMsg) {
long pkgOffset = pkgStatusMsg.getOffset();
// TODO: check revision
Map<Long, Status> agentStatus = getAgentStatus(pkgStatusMsg.getSubAgentName());
agentStatus.put(pkgOffset, pkgStatusMsg.getStatus());
agentStatus.computeIfAbsent(pkgOffset, offset -> pkgStatusMsg.getStatus());
}
}

0 comments on commit a06c5c8

Please sign in to comment.