@@ -1160,6 +1160,10 @@ def _run_one_plan(plan: ProductPlan) -> Tuple[bool, float, SyncStats, str, str]:
11601160 if not requested_dates_for_plan :
11611161 if catch_up_to_latest :
11621162 elapsed = time .time () - t_product_start
1163+ # 读取本地 timestamp,用于填充 date_time,避免 GUI 用 today 计算落后天数
1164+ local_date_for_report = read_local_timestamp_date (
1165+ command_ctx .data_root , normalize_product_name (plan .name )
1166+ )
11631167 # 并发路径:写 report 需加锁,防止 list.append 与其他线程竞争
11641168 with _lock :
11651169 _append_result (
@@ -1168,6 +1172,7 @@ def _run_one_plan(plan: ProductPlan) -> Tuple[bool, float, SyncStats, str, str]:
11681172 status = "skipped" ,
11691173 strategy = plan .strategy ,
11701174 reason_code = REASON_NO_DATA_FOR_DATE ,
1175+ date_time = local_date_for_report or "" ,
11711176 elapsed = elapsed ,
11721177 mode = "gate" ,
11731178 error = "catch-up 日期队列为空,已跳过本产品。" ,
@@ -1560,6 +1565,12 @@ def run_update_with_settings(
15601565 max_workers = max_workers ,
15611566 progress_callback = progress_callback ,
15621567 )
1568+ # 后处理前通知前端,postprocessing 状态用于 GUI 显示"正在后处理数据..."
1569+ if progress_callback is not None :
1570+ try :
1571+ progress_callback ("" , len (plans ), len (plans ), status = "postprocessing" )
1572+ except Exception :
1573+ pass
15631574 preprocess_has_error = _maybe_run_coin_preprocess (
15641575 command_ctx = command_ctx ,
15651576 report = report ,
@@ -1580,6 +1591,12 @@ def run_update_with_settings(
15801591 max_workers = max_workers ,
15811592 progress_callback = progress_callback ,
15821593 )
1594+ # 后处理前通知前端,postprocessing 状态用于 GUI 显示"正在后处理数据..."
1595+ if progress_callback is not None :
1596+ try :
1597+ progress_callback ("" , len (plans ), len (plans ), status = "postprocessing" )
1598+ except Exception :
1599+ pass
15831600 preprocess_has_error = _maybe_run_coin_preprocess (
15841601 command_ctx = command_ctx ,
15851602 report = report ,
0 commit comments