规范了update data的构建方式,统一使用build_update_request_data方法来处理更新数据的构建和过滤逻辑。这个方法会根据提供的原始数据、更新数据和对应的schema来生成最终的更新请求数据,同时会自动排除掉未变化的字段和空值字段,从而确保只发送必要的更新信息到后端接口。这种方式不仅简化了代码逻辑,还提高了代码的可维护性和一致性。

This commit is contained in:
strepsiades
2026-03-30 14:51:01 +08:00
parent f50dc1aed0
commit bdc7bd5069
28 changed files with 416 additions and 129 deletions
@@ -509,8 +509,22 @@ class FullSyncPipeline:
else:
self._logger.info("🔄 Post-check: reloading all node types for final consistency evaluation...")
for node_type in self.node_types:
strategy = next((item for item in self.strategies if item.node_type == node_type), None)
if strategy is not None and strategy.skip_post_check:
self._logger.info("⏭️ Post-check reload skipped: node_type=%s", node_type)
continue
await self._reload_node_type(node_type, reason="post-check final reload")
for node_type in self.node_types:
strategy = next((item for item in self.strategies if item.node_type == node_type), None)
if strategy is not None and strategy.skip_post_check:
self._logger.info("⏭️ Post-check skipped: node_type=%s", node_type)
self._consistency_by_type[node_type] = {
"ok": True,
"checked_pairs": 0,
"mismatch_count": 0,
"skipped": True,
}
continue
await self._evaluate_consistency_for_node_type(node_type)
self.stats["consistency"] = {