From 62d52d5d0459322abff5d97df8746e7cc4121d2f Mon Sep 17 00:00:00 2001 From: xxm Date: Mon, 24 Aug 2026 09:23:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=A1=E8=AE=A1=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E7=AA=97=E5=8F=A39-16=E2=86=9210-15(?= =?UTF-8?q?=E7=9B=98=E5=89=8D=E9=87=87=E9=9B=86=E7=AA=97=E5=8F=A3=E5=86=85?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=81=9C=E4=B8=8A=E4=B8=80=E4=BA=A4=E6=98=93?= =?UTF-8?q?=E6=97=A5=E6=98=AF=E6=AD=A3=E5=B8=B8=E7=9A=84,9:18=E8=AF=AF?= =?UTF-8?q?=E6=8A=A5macro=5Fcontext=5Flog)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/profile-scripts/system_hygiene_audit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deploy/profile-scripts/system_hygiene_audit.py b/deploy/profile-scripts/system_hygiene_audit.py index 9f8b94ec..0563b66a 100644 --- a/deploy/profile-scripts/system_hygiene_audit.py +++ b/deploy/profile-scripts/system_hygiene_audit.py @@ -355,8 +355,11 @@ def check_db_freshness(): try: c = sqlite3.connect(os.path.join(DATA_DIR, 'mofin.db'), timeout=10) now = datetime.now() - is_trading_time = now.weekday() < 5 and 9 <= now.hour <= 16 - # 2026-08-24 周末豁免:非交易阈值需覆盖周末休市(周五17:00→周一09:30≈64.5h), + # 2026-08-24 窗口收窄:10-15点才算交易时间——9:00-9:30盘前采集窗口内数据 + # 停在上一交易日是正常的(refresh_macro_context等9:00盘前取不到实时指数不写), + # 10点后采集窗口已过,4h阈值抓的是真停滞 + is_trading_time = now.weekday() < 5 and 10 <= now.hour <= 15 + # 周末豁免:非交易阈值需覆盖周末休市(周五17:00→周一09:30≈64.5h), # 48h 导致周一早上必误报;真停滞会在下一交易时段被 4h 阈值抓住,不会漏 for table, col, label in CORE_TABLES: try: