4bd856ab8d
- 背景: miniQMT 58610 IPythonApiServer 自 09-09 误杀后不再自启(isAutoBind实验无效), xt_eod连续断粮;桥shim(xtquant_compat)全量覆盖xt_eod所需函数 - 坑: PS5.1对无BOM文件按ANSI/GBK解析——wrapper含中文注释时多字节字符错位可吃掉 后续语句行(PYTHONPATH行被注释->仍走site-packages原版xtquant),故wrapper强制ASCII - 实测: universe 2264+39/下载ok/入库ok=400 empty=0 fail=0 rows=9200进行中
18 lines
1.2 KiB
PowerShell
18 lines
1.2 KiB
PowerShell
# xt_eod_wrapper.ps1 - sanguo-xt-eod schtask wrapper (21:00 xtdata ETF/fund EOD increment)
|
|
# plan A: ETF/fund (baostock blind zone) -> dbbardata('d')
|
|
# 2026-09-10 data leg switch: xtquant via big-QMT redis bridge shim
|
|
# (xtquant_bridge PYTHONPATH -> in-process full market data). Replaces the dead
|
|
# miniQMT 58610 standalone service (IPythonApiServer stopped self-starting after
|
|
# the 09-09 accidental kill; root cause unresolved).
|
|
# NOTE: keep this file ASCII-only (PS 5.1 reads no-BOM files as ANSI/GBK).
|
|
$env:PYTHONPATH = 'C:\sanguo_bigqmt\xtquant_bridge;C:\sanguo_vnpy_v2;C:\sanguo_vnpy_v2\vnpy_v4.4.0;C:\sanguo_vnpy_v2\vnpy_qmt_v0.3.3'
|
|
$env:BIGQMT_ACCOUNT_ID = '66639661'
|
|
$env:BIGQMT_REDIS_PASSWORD = (Select-String -Path 'C:\redis\redis.conf' -Pattern '^requirepass\s+(\S+)' | ForEach-Object { $_.Matches[0].Groups[1].Value })
|
|
Set-Location C:\sanguo_vnpy_v2
|
|
$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 "xt_eod_$ts.txt"
|
|
C:\Python310\python.exe -X utf8 C:\sanguo_vnpy_v2\scripts\data_platform\xt_eod.py *>> $log
|
|
exit $LASTEXITCODE
|