EDQS: added error handling while data sync
This commit is contained in:
parent
7e010385f1
commit
1f242df5eb
@ -161,6 +161,7 @@ public abstract class EdqsSyncService {
|
||||
|
||||
private void processRelationBatch(List<RelationEntity> relations) {
|
||||
for (RelationEntity relation : relations) {
|
||||
try {
|
||||
if (RelationTypeGroup.COMMON.name().equals(relation.getRelationTypeGroup())) {
|
||||
EntityIdInfo entityIdInfo = entityInfoMap.get(relation.getFromId());
|
||||
if (entityIdInfo != null) {
|
||||
@ -169,6 +170,9 @@ public abstract class EdqsSyncService {
|
||||
log.info("Relation from id not found: {} ", relation);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to sync relation batch: {}", relation, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -207,6 +211,7 @@ public abstract class EdqsSyncService {
|
||||
|
||||
private void processAttributeBatch(List<AttributeKvEntity> batch) {
|
||||
for (AttributeKvEntity attribute : batch) {
|
||||
try {
|
||||
attribute.setStrKey(getStrKeyOrFetchFromDb(attribute.getId().getAttributeKey()));
|
||||
UUID entityId = attribute.getId().getEntityId();
|
||||
EntityIdInfo entityIdInfo = entityInfoMap.get(entityId);
|
||||
@ -220,6 +225,9 @@ public abstract class EdqsSyncService {
|
||||
attribute.toData(),
|
||||
attribute.getVersion());
|
||||
process(entityIdInfo.tenantId(), ATTRIBUTE_KV, attributeKv);
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to sync attribute batch: {}", attribute, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user