feat(ak): ak_events wrapper 挂载 margin 域 T-2~T 三天窗——深市TMC段T+1供应+最近两日块窗,三天窗留自愈;更旧缺口每周六--margin-backfill幂等兜底 [vps]
CI/CD / test (push) Successful in 30s
CI/CD / nas-deploy (push) Successful in 31s
CI/CD / nas-verify (push) Successful in 14s

This commit is contained in:
2026-09-12 08:57:35 +08:00
parent f7fb7b7530
commit f80ca2f09d
+7 -1
View File
@@ -27,6 +27,7 @@ $env:all_proxy = ''
Set-Location C:\sanguo_vnpy_v2
$today = Get-Date -Format yyyyMMdd
$yesterday = (Get-Date).AddDays(-1).ToString('yyyyMMdd')
$day3 = (Get-Date).AddDays(-2).ToString('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 }
@@ -35,4 +36,9 @@ C:\Python310\python.exe -X utf8 C:\sanguo_vnpy_v2\scripts\data_platform\akshare_
$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 }
# margin (2026-09-12 四域扩展, 融合 spec §20): 双市个股两融明细. 深市 TMC 段
# T+1 供应且只保留最近两日块 → T-2~T 三天窗给深段留自愈; 更旧缺口由每周
# 六 --margin-backfill 幂等兜底 (七段整段翻页, 见 spec §20.2).
C:\Python310\python.exe -X utf8 C:\sanguo_vnpy_v2\scripts\data_platform\akshare_static_download.py --types margin --start $day3 --end $today *>> $log
$rc3 = $LASTEXITCODE
if ($rc1 -ne 0 -or $rc2 -ne 0 -or $rc3 -ne 0) { exit 1 } else { exit 0 }