fix(HEL-356): prewarm published sector quotes
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -488,7 +488,12 @@ def warm_realtime(db: HubDB) -> dict[str, Any]:
|
|||||||
sector_rows: list[dict[str, Any]] = []
|
sector_rows: list[dict[str, Any]] = []
|
||||||
try:
|
try:
|
||||||
masters = db.fetchall(
|
masters = db.fetchall(
|
||||||
"SELECT ts_code FROM sector_master WHERE family = 'sw' ORDER BY ts_code"
|
"""
|
||||||
|
SELECT ts_code FROM sector_master WHERE family = 'sw'
|
||||||
|
UNION
|
||||||
|
SELECT ts_code FROM eod_sector_daily WHERE family = 'sw'
|
||||||
|
ORDER BY ts_code
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
codes = [str(row.get("ts_code") or "") for row in masters if row.get("ts_code")]
|
codes = [str(row.get("ts_code") or "") for row in masters if row.get("ts_code")]
|
||||||
sector_rows = _eastmoney_sector_quotes(codes)
|
sector_rows = _eastmoney_sector_quotes(codes)
|
||||||
|
|||||||
Reference in New Issue
Block a user