fix(screening): improve B1 scan reliability on Windows#2
Merged
Conversation
CyrusAuyeung
marked this pull request as ready for review
July 15, 2026 06:20
CyrusAuyeung
force-pushed
the
agent/b1-scan-reliability
branch
from
July 16, 2026 08:53
e67d058 to
53a83a4
Compare
kunkundi
force-pushed
the
agent/b1-scan-reliability
branch
from
July 16, 2026 08:58
863a302 to
f1cb40e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改内容
DASHBOARD_B1_SCAN_WORKERS调整并限制在 1–16。main(de75063)重新整合:完整保留板块潮汐的行业预处理、共享市场/板块上下文和策略注册;共享上下文构建完成后才并发单股评分。问题原因
Dashboard 的部分候选缓存读取依赖系统默认编码,而扫描器按 UTF-8 写入 JSON;中文 Windows 默认 CP936 因此可能抛出
UnicodeDecodeError。全市场扫描还存在两个性能放大点:单股评分串行执行,以及融资融券、大宗交易接口按候选股重复拉取同一份全市场数据。手动和定时入口同时运行时会进一步放大负载;引入 worker 后,共享缓存的 check-then-set 还必须加锁以避免重复请求风暴。
兼容性与影响范围
验证
完整验证同时通过 Python、JavaScript、Shell 和 Windows BAT 语法检查。
Fixes #1