feat: 详细日志(分页/映射/批次进度)+ Artifacts 摘要(sync-summary/verify-report)
This commit is contained in:
@@ -11,7 +11,7 @@ from prefect import flow, task
|
||||
|
||||
from api.riin.models import OrderPageRequest
|
||||
from flows.riin._pipeline import sync_riin_records
|
||||
from flows.shared import SyncDB, create_riin_client
|
||||
from flows.shared import SyncDB, build_stats_rows, create_riin_client, emit_sync_summary
|
||||
|
||||
|
||||
def _split_order_nos(text: str) -> list[str]:
|
||||
@@ -52,6 +52,7 @@ def riin_by_orders_sync(order_nos: str) -> dict:
|
||||
raw = fetch_by_orders(nos)
|
||||
stats = upsert_records(raw)
|
||||
print(f"完成: 匹配 {len(raw)} | {stats}")
|
||||
emit_sync_summary("RIIN 指定单号同步", build_stats_rows("RIIN", stats, [("输入单号", len(nos)), ("匹配", len(raw))]))
|
||||
return {"inputCount": len(nos), "matchedCount": len(raw), **stats}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user