feat: 详细日志(分页/映射/批次进度)+ Artifacts 摘要(sync-summary/verify-report)
This commit is contained in:
@@ -10,7 +10,8 @@ from prefect import flow, task
|
||||
from api.sds.models import OrderPageRequest
|
||||
from flows.sds._pipeline import sync_sds_records
|
||||
from flows.shared import (
|
||||
SyncDB, create_sds_client, get_channel_type_map, refresh_channel_type_map,
|
||||
SyncDB, build_stats_rows, create_sds_client, emit_sync_summary,
|
||||
get_channel_type_map, refresh_channel_type_map,
|
||||
)
|
||||
|
||||
SDS_FINISHED_STATUSES = ["已完成", "已取消"]
|
||||
@@ -54,6 +55,7 @@ def sds_refresh_pending() -> dict:
|
||||
raw = fetch_pending(order_nos)
|
||||
stats = upsert_records(raw)
|
||||
print(f"完成: 匹配 {len(raw)} | {stats}")
|
||||
emit_sync_summary("SDS 刷新未完结", build_stats_rows("SDS", stats, [("未完结订单", len(order_nos)), ("匹配", len(raw))]))
|
||||
return {"pendingCount": len(order_nos), "matchedCount": len(raw), **stats}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user