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 -2
View File
@@ -11,8 +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, floor_to_hour, format_date,
get_channel_type_map, refresh_channel_type_map,
SyncDB, build_stats_rows, create_sds_client, emit_sync_summary, fetch_sds_all_pages,
floor_to_hour, format_date, get_channel_type_map, refresh_channel_type_map,
)
@@ -52,6 +52,7 @@ def sds_incremental_sync() -> dict:
raw = extract_orders(params)
stats = upsert_records(raw)
print(f"完成: 订单 {stats['orderCount']} / 商品 {stats['goodsCount']}")
emit_sync_summary("SDS 增量同步", build_stats_rows("SDS", stats, [("时间范围", f"{params['pay_date_begin']} ~ {params['pay_date_end']}")]))
return {"syncRange": {"from": params["pay_date_begin"], "to": params["pay_date_end"]}, **stats}