From 16843bdc7ee9c122316db987de4522502420edc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=80=BB=E7=AE=A1?= Date: Wed, 9 Sep 2026 11:20:17 +0800 Subject: [PATCH] fix(HEL-356): prewarm published sector quotes Co-authored-by: multica-agent --- xiaobai-datahub/datahub/realtime_serve.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xiaobai-datahub/datahub/realtime_serve.py b/xiaobai-datahub/datahub/realtime_serve.py index e2e8196..b3cfb71 100644 --- a/xiaobai-datahub/datahub/realtime_serve.py +++ b/xiaobai-datahub/datahub/realtime_serve.py @@ -488,7 +488,12 @@ def warm_realtime(db: HubDB) -> dict[str, Any]: sector_rows: list[dict[str, Any]] = [] try: 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")] sector_rows = _eastmoney_sector_quotes(codes)