From 564160db113d2d4be2a72d6ca9895ddcbe846e46 Mon Sep 17 00:00:00 2001 From: claude_dev Date: Wed, 2 Sep 2026 22:47:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(data):=20margin=5Fsse=20=E6=8B=86=20T-1~T?= =?UTF-8?q?=20=E4=B8=A4=E5=A4=A9=E7=AA=97=E2=80=94=E2=80=94=E5=B7=A1?= =?UTF-8?q?=E6=9F=A5=E5=AE=9E=E9=94=A4=20SSE=20=E8=9E=8D=E8=B5=84=E8=9E=8D?= =?UTF-8?q?=E5=88=B8=20T+1=20=E4=BE=9B=E5=BA=94,=E5=BD=93=E6=99=9A?= =?UTF-8?q?=E6=8B=89=E5=BD=93=E5=A4=A9=E7=BB=93=E6=9E=84=E6=80=A7=E6=B0=B8?= =?UTF-8?q?=E8=B4=A5=2043=20=E5=A4=A9(=E7=94=A8=E6=88=B7=E6=89=B9=E5=87=86?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E4=BF=AE)=20[vps]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 07-22 起慢性失血实锤: margin_sse 最后非空文件 20260721,之后 30 个交易日 全被旧码标成 空文件+done 锁死(每晚 19:30 拉当天,SSE 当日数据未发布→ 空响应→akshare Length mismatch 崩→旧码转 empty 落盘+marker)。 已处置(同批): --force 回补 20260722~20260901 全区间 30/30 ok 59865 行; 本 commit=结构根治: wrapper 把 margin_sse 从 13 类当日批拆出,单独 --start T-1 --end T 两天窗——每晚稳定写昨日(数据已发布),当天失败不写 不标(新语义),次晚同窗自动重试补上,单晚漏跑自愈;两段 exit code 合并 任一非零即非零。0902 今晨已过 19:30,明晚首验(写 0902+0903)。 生效位=VPS scripts(手动 scp,CI 不覆盖 VPS)。 --- scripts/data_platform/ak_events_wrapper.ps1 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/data_platform/ak_events_wrapper.ps1 b/scripts/data_platform/ak_events_wrapper.ps1 index 0fa7a25..9594ae1 100644 --- a/scripts/data_platform/ak_events_wrapper.ps1 +++ b/scripts/data_platform/ak_events_wrapper.ps1 @@ -1,16 +1,23 @@ # ak_events_wrapper.ps1 — sanguo-ak-events schtask wrapper (daily 19:30 akshare 事件类 per-date 当日) -# dragon_tiger/block_trade/margin_sse/restricted/zt_pool 三件套/新浪资金流×2/同花顺行业概念/雪球热度/新浪行业对账 --start today --end today; +# dragon_tiger/block_trade/restricted/zt_pool 三件套/新浪资金流×2/同花顺行业概念/雪球热度/新浪行业对账 --start today --end today; # per-date 每类1 unit 快; zt_pool 系 (2026-09-02 双机实测 push2ex 集群稳定) 供情绪/打板因子; # hot_rank (东财人气榜) 墙待恢复窗测量, 拍板后加入 --types (fetcher/注册已就位); # 新浪资金流+同花顺榜 (2026-09-02 用户批 A 档: 东财 push2 墙死后免费无墙替代, 秒级零限流) +# margin_sse 单独拆出 (2026-09-02 巡查+用户批准): SSE 融资融券 T+1 供应,当晚拉当天→空响应 +# akshare Length mismatch 崩(07-22 起 43 天慢性失血,已 --force 回补 0722~0901); +# 改拉 T-1~T 两天窗:每晚稳定写昨日;当天失败不写不标,次晚同窗自动重试补上 $env:http_proxy = '' $env:https_proxy = '' $env:all_proxy = '' Set-Location C:\sanguo_vnpy_v2 $today = Get-Date -Format yyyyMMdd +$yesterday = (Get-Date).AddDays(-1) -Format yyyyMMdd $ts = Get-Date -Format 'yyyyMMdd_HHmmss' $logDir = 'C:\sanguo_vnpy_v2\data\migration_logs' if (-not (Test-Path $logDir)) { New-Item -ItemType Directory -Path $logDir -Force | Out-Null } $log = Join-Path $logDir "ak_events_$ts.txt" -C:\Python310\python.exe -X utf8 C:\sanguo_vnpy_v2\scripts\data_platform\akshare_static_download.py --types dragon_tiger,block_trade,margin_sse,restricted,zt_pool,zt_pool_zbgc,zt_pool_dtgc,fund_flow_industry,fund_flow_concept,ths_industry,ths_concept,xueqiu_hot,sina_sector --start $today --end $today *>> $log -exit $LASTEXITCODE +C:\Python310\python.exe -X utf8 C:\sanguo_vnpy_v2\scripts\data_platform\akshare_static_download.py --types dragon_tiger,block_trade,restricted,zt_pool,zt_pool_zbgc,zt_pool_dtgc,fund_flow_industry,fund_flow_concept,ths_industry,ths_concept,xueqiu_hot,sina_sector --start $today --end $today *>> $log +$rc1 = $LASTEXITCODE +C:\Python310\python.exe -X utf8 C:\sanguo_vnpy_v2\scripts\data_platform\akshare_static_download.py --types margin_sse --start $yesterday --end $today *>> $log +$rc2 = $LASTEXITCODE +if ($rc1 -ne 0 -or $rc2 -ne 0) { exit 1 } else { exit 0 }