feat: 详细日志(分页/映射/批次进度)+ Artifacts 摘要(sync-summary/verify-report)

This commit is contained in:
yeuimu
2026-07-23 09:01:39 +00:00
parent 367168bcdc
commit 4ec7cf2dd6
18 changed files with 154 additions and 22 deletions
+3 -1
View File
@@ -11,7 +11,8 @@ from prefect import flow, task
from flows.sds._pipeline import sync_sds_records
from flows.shared import (
SyncDB, create_sds_client, fetch_sds_all_pages, get_channel_type_map, refresh_channel_type_map,
SyncDB, build_stats_rows, create_sds_client, emit_sync_summary,
fetch_sds_all_pages, get_channel_type_map, refresh_channel_type_map,
)
@@ -69,6 +70,7 @@ def sds_order_sync(
raw = extract_orders(params)
stats = upsert_records(raw)
print(f"完成: 订单 {stats['orderCount']} / 商品 {stats['goodsCount']} / 跳过待付款 {stats.get('skippedUnpaid',0)}")
emit_sync_summary("SDS 订单同步", build_stats_rows("SDS", stats, [("时间范围", f"{pay_date_begin} ~ {pay_date_end}")]))
return {"syncRange": {"from": pay_date_begin, "to": pay_date_end}, **stats}