Skip to content

Commit

Permalink
fix: fix the count of processedDocuments in operator_log
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien committed Nov 26, 2024
1 parent 4971fec commit dcabb38
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ public record ProcessedDocuments(Integer count, Integer timeSpent) {
public static final ProcessedDocuments ONE = new ProcessedDocuments(1, null);

public static ProcessedDocuments in(CustomMessage customMessage) {
int count = customMessage.getMessageItems().size() + customMessage.getGuarantorItems().size();
int countGuarantorDocuments = customMessage.getGuarantorItems().stream()
.mapToInt(i -> i.getMessageItems().size())
.sum();
int count = customMessage.getMessageItems().size() + countGuarantorDocuments;
try {
int timeSpent = Integer.parseInt(customMessage.getTimeSpent()) / 1000;
return new ProcessedDocuments(count, timeSpent);
Expand Down

0 comments on commit dcabb38

Please sign in to comment.