Skip to content

Commit

Permalink
ajout check format du fichier incorrect meme en force
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelQuetin committed Dec 11, 2024
1 parent 38fa88d commit 547bd73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/fr/abes/logskbart/kafka/LogsListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ public void listenInfoKbart2KafkaAndErrorKbart2Kafka(ConsumerRecord<String, Stri

if ((dto.getMessage().contains("Traitement terminé pour fichier " + packageName)) || (dto.getMessage().contains("Traitement refusé du fichier " + packageName))) {
saveDatas(workInProgressMap.get(packageName).getMessages());
if (!packageName.contains("_FORCE")) {
if (!packageName.contains("_FORCE") || workInProgressMap.get(packageName).getMessages().stream().anyMatch(log ->
(log.getNbLine() == -1) && log.getMessage().equals("Format du fichier incorrect")
)) {
createFileBad(packageName);
}
workInProgressMap.remove(packageName);
Expand Down

0 comments on commit 547bd73

Please sign in to comment.