From 7e46d49cfcc4f202bc03470cedb12ff58afa83be Mon Sep 17 00:00:00 2001 From: zlt Date: Wed, 9 Sep 2026 14:55:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E6=B5=8B=E7=9A=84=E9=A3=8E=E6=8E=A7?= =?UTF-8?q?=E5=8D=96=E5=87=BA=E6=B5=81=E7=94=A8=E7=9C=9F=E5=AE=9E=E6=AF=AB?= =?UTF-8?q?=E7=A7=92=E5=BD=93=E6=B5=81=20id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/test_batch24_units.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/test_batch24_units.py b/scripts/test_batch24_units.py index 02218d0..a6c722c 100644 --- a/scripts/test_batch24_units.py +++ b/scripts/test_batch24_units.py @@ -144,7 +144,9 @@ def test_parse_sources(): unknown = [r for r in arows if not r["stale"]][0] assert unknown["cat"] == "other" and unknown["direction"] == "看跌", unknown - sell = [("1-0", {"data": '{"ts_code": "601126.SH", "action": "SELL", "confidence": 0.8,' + # 不分键的流要用真实毫秒当流 id (Redis 自动生成的 id 毫秒就是写入时刻), + # 否则会被"扫到今天零点为止"直接截掉 —— 这正是那道截断在起作用。 + sell = [("%d-0" % _today_ms(14, 10), {"data": '{"ts_code": "601126.SH", "action": "SELL", "confidence": 0.8,' ' "dominant_signal": "BREAK_DOWN", "llm_reason": "跌破支撑",' ' "timestamp": %d}' % _today_ms(14, 10)})] srows, _n, _t = us._bycode_sell(_FakeRedis({"bionic:signals:llm_sell_actions": sell}), "601126.SH", 5000)