SUPPORT-9212: фиксы

This commit is contained in:
adel.kalimullin 2025-06-10 17:14:27 +03:00
parent 90b86f9902
commit 8011f4a83e
2 changed files with 11 additions and 2 deletions

View file

@ -9,6 +9,15 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown = true)
public class UpsertMessage<T>{
private T data;
private boolean success;
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public T getData() {
return data;

View file

@ -48,7 +48,6 @@ public class ErvuDirectoriesService {
.collect(Collectors.toMap(DataProcessor::getType, p -> p));
}
public void updateDirectories() {
try {
String[] ervuDirectoriesArray = ervuDirectories.split(",");
@ -78,7 +77,8 @@ public class ErvuDirectoriesService {
UpsertMessage<T> message = objectMapper.readValue(kafkaMessage, messageType);
if (message.getData() != null) {
if (Boolean.TRUE.equals(message.isSuccess())
&& message.getData() != null) {
DataProcessor<T, ?> processor = (DataProcessor<T, ?>) dataProcessors.get(entityClass);
if (processor == null) {
throw new IllegalStateException("No processor found for " + entityClass.getSimpleName());