SUPPORT-9212: фиксы
This commit is contained in:
parent
90b86f9902
commit
8011f4a83e
2 changed files with 11 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue