23 lines
810 B
Python
23 lines
810 B
Python
"""已有快照保留;首次导出最多并发两个独立只读容器。需已授权155读访问。"""
|
||
import gzip
|
||
import json
|
||
import subprocess
|
||
import sys
|
||
from concurrent.futures import ThreadPoolExecutor
|
||
from pathlib import Path
|
||
|
||
ROOT=Path(__file__).resolve().parent
|
||
|
||
def fetch(mode):
|
||
subprocess.run([sys.executable,str(ROOT/'fetch.py'),mode],check=True)
|
||
|
||
def main():
|
||
fetch('coverage');fetch('reference')
|
||
with gzip.open(ROOT/'raw/coverage.json.gz','rt') as f:data=json.load(f)['data']
|
||
dates=sorted({r['trade_date'] for v in data.values() for r in v['rows']})
|
||
assert all('2025-11-10'<=d<='2026-10-29' for d in dates)
|
||
with ThreadPoolExecutor(max_workers=2) as executor:
|
||
list(executor.map(fetch,['allchips_'+d.replace('-','') for d in dates]))
|
||
|
||
if __name__=='__main__':main()
|